How to create a Incident ageing Report in the performance analytics widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 12:27 AM
Hi,
We have an urgent requirement from the customer to create a Time series Incident Ageing graph in the Performance Analytics Dashboard.
The X- axis would contain the days and the Y-axis will contain the count of the total pending incidents..
The major hurdle is to calculate the age of the incident from the last updated data-time and leverage it in the PA to get the outcome of of total age of the incident VS days.
Early suggestions will be highly appreciated.
Thanks
Samudra
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2022 05:46 AM
Hi Samudra,
You should PA scripts for this. Navigate to Performance analytics --> Script and create the below script object. You may also use the OOTB scripts as these are OOTB scripts.
var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
var days=function(x,y){return diff(x,y)/(24*60*60*1000);};
days(current.sys_updated_on, score_end);
In the script field in automated indicator, add the above script name. And since it's per day v/s age, you can use average in the aggregate field.