Aggregating data - monthly to annual

Colin Chalmers
Tera Contributor

Hi all,

 

We recently did a PoC for a client and ran into a couple of issues which we found limiting in functionality.

Maybe this is meant to be, or not and there is a fix/enhancement coming.

 

We set up manual metric definition to get monthly inputs of data for energy bills. We then wanted to setup a calculated metric definition to aggregate data on an annual roll-up frequency but that is not possible.

 

While it’s possible to aggregate multiple metrics into a single (calculated) metric, they all must have the same frequency. So, monthly metrics roll-up into a monthly metric. We couldn’t collect monthly metrics, calculate the emissions with an emission factor, and then roll them up into a single annual CO2e metric for the annual report.

 

Is this the expected behaviour and if so, why? Maybe we are missing something.

 

Thanks in advance!

7 REPLIES 7

Hi Vaisakh,

 

Thanks!

 

1. I see the tables and I see they are populated with info

2. I see the Scheduled Jobs and appreciate they run on a scheduled basis

3. You've lost me on this step. I am trying to set up a simple  manual metric definition but don't see how I connect this to the data above. I'm sorry I must be overlooking something. Do you have a link to steps / screenshots how to do this? I'd love to get this working before our next client demo.

 

Colin

 

Hi Colin,

 

For #3, the above tables are populated from the data that you have in the metric definitions and metrics you defined for data collection, by the scheduled jobs that I mentioned.

 


Do you have a link to steps / screenshots how to do this? I'd love to get this working before our next client demo.


I did not get what additional steps are you looking for other than the ones I gave in my first reply. You don't have to do anything other than setting up the manual metric definition in the frequency you want to collect the data at. The above tables get populated using the scheduled jobs, and then you can use those tables' data for your reporting.

 

Thanks,

Vaisakh

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Colin Chalmers ,
I trust you are doing great.

To address your query regarding this behavior, it appears that the inability to roll up monthly metrics into an annual CO2e metric for the annual report is indeed the expected behavior in ServiceNow's current functionality. The reason behind this limitation may be due to the system's design and architecture, where calculated metrics are required to have the same frequency.

To work around this limitation and achieve your desired outcome of calculating annual CO2e metrics for the annual report, you can consider the following approach:

  1. Create a custom script or business rule that runs at the desired frequency (e.g., annually) to perform the calculations and generate the annual CO2e metric.

  2. Within the script or business rule, retrieve the monthly metrics for the specific time period you want to aggregate (e.g., the past year).

  3. Apply the appropriate emission factor or formula to calculate the CO2e value for each month's metric.

  4. Sum up the CO2e values for all the monthly metrics to obtain the annual CO2e metric.

  5. Store or update the annual CO2e metric in the appropriate table or field within ServiceNow.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi