PA | Collecting data up to and including the previous month?

DJL2
Kilo Guru

Hi all,

I've a question which probably has a simple answer:

  • If you are collecting scores for monthly Indicators, how do you ensure that the data which is returned does not include data for the month you are in?  So for example, if I ran a job today, I'd want to collect monthly scores up to and including April - but not the data for the 16 days thus far into May.

To try and get this to work, I've:

  1. Modified the Frequency for Changes.Closed to Monthly
  2. Modified the Conditions to Closed | On | Last Month
  3. Created an # of Monthly Changes Closed indicator, using this as its source
  4. Associated it to the [PA Change] Daily Data Collection job

I was hoping this would return all data up to last month (April) however, it's returning May's too.  I'm a little bit stumped!

Any tips?

Thanks as always...

3 REPLIES 3

Adam Stout
ServiceNow Employee
ServiceNow Employee

Your indicator source should be Closed | On | This month.

Your job (you may need a new job for this) will run from 1 month ago to 1 month ago. 

Alternately, you can keep this daily and just apply a time series of By Month SUM (NOT SUM+).  You can see some examples of applying time series here: https://community.servicenow.com/community?id=community_blog&sys_id=675c5793dbbc63c85129a851ca96191c

Hi Adam

Only just seen your reply - many thanks.  I will give that a go and see if it works, and thank you also for sharing that link - looks like some really useful stuff on there.

Laxmikanth
Tera Expert

Hi DJL,

I understand your requirement is to collect score on monthly basis to show the list of Closed Changes. In this case, you have 2 options use the Historic Data Collection to collect the data up-to the last month, and use the daily data collection to accumulate the score for the current month. The reason you see that you get the data until previous day is because the criteria (duration) of  data collection in daily job should is to collect for the previous day.

Alternatively you can amend the collection range in Historic Job and run it on 1st of every month, but is not a recommended approach.