Is it possible to to use a report for a calculation?

Peter W1
Tera Contributor

Hello,

I am trying to create a new report that shows system uptime as a percentage for the last 30 days based on a custom duration field in the incident table. Example: There are 3 incidents in the last 30 days with a sum total duration of 2 hours and 14 minutes. That represents a total of 8040 seconds. So the uptime percentage that would be displayed is 99.69 since there are 2,592,000 seconds in 30 days.

Is this possible? I was trying to find a way to have this calculation displayed but cannot seem to create a report based on this math calculation.

Thanks,

Peter

7 REPLIES 7

Mohith Devatte
Tera Sage
Tera Sage

Hello,

Yes you can do it in normal reporting 

Navigate as below

Reports -- >Create New Report-->Give the table as incident and select the type of report as column report under time series section 

After this once you enter into configure section select below values in respective fields

Calendar as standard calendar 

per as month 

aggregation as sum

and under sum select your custom field which "Duration"

And click on run report .This will generate the sum for each incident duration 

Please accept the solution if you find it helpful

Unfortunately that doesn't answer my question as I need to display the percentage which is 99.69; not the aggregation as sum. So I would need to display this calculation: ((2592000 - SUM_OF_DURATION) / 2592000) * 100

Thanks,

Peter

Yousaf
Giga Sage

Hi Peter,

Check this link it might be helpful.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746219

Mark Correct or Helpful if it helps

Thanks,
Yousaf


***Mark Correct or Helpful if it helps.***

tanvi deshpande
Tera Contributor

Hi,

I recently created such a report but it was system downtime. To get it as percentage you can use performance analytics and formula indicator. Create indicator source based on closed date on daily basis and your other filter conditions. 

The automated indicator for numerator will be sum of duration of incidents closed on that day. there will be a option to select sum instead of count and use duration field for this.

then to get percentage you will need to create a formula indicator

100 * ( * you numerator indicator / by month sum + ) / ( (score_end.getDaysInMonth() * 1440 * 60 * 1000 )

 

This works perfectly. However the 1440 * 60 * 1000 you will need to check what does your numerator return data in. Mine does in milisecond.