- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 11:41 PM
Hi,
We have two fields "Start time" and "Mitigation time" on Incident form. The difference between these two will be taken as "Hours of Impact" and we have to show the same using Performance Analytics module.
Using PA, we have to show the hours of impact for all incidents. I have gone through all the indicators and observed this cannot be done even by Formula Indicators. Since Formula Indicators will be applied between two different indicators.
Can we use Metrics to calculate the difference and create database view on both metric and Incident and call it in Indicator. Is this advisable or is there any other way.
Could anyone provide suggestion.
Thanks in Advance!
Regards,
Amani
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2017 01:40 AM
Hi Amani,
I think you should create an Indicator like the OOTB Indicator "Summed duration of resolved incidents" which is using a script to calculate the difference in Hours. See the script below.
var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
var hours=function(x,y){return diff(x,y)/(60*60*1000);};
hours(current.opened_at, current.resolved_at);
Regards,
Gertjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2017 01:40 AM
Hi Amani,
I think you should create an Indicator like the OOTB Indicator "Summed duration of resolved incidents" which is using a script to calculate the difference in Hours. See the script below.
var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
var hours=function(x,y){return diff(x,y)/(60*60*1000);};
hours(current.opened_at, current.resolved_at);
Regards,
Gertjan