- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2018 03:12 PM
Hi,
I have a requirement to show the difference between RCA Delivery Date and Problem Record Open Date from problem record. I need to show the avg of those records with assignment groups in row and months in a column.
Something like this:
Any help would be appreciated.
Thanks in advance,
Su
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 06:15 AM
A couple of notes:
1) Your calculation calculates days, but your unit displayed is hours. If you want it in hours, you need to change this line:
var hours=function(x,y){return diff(x,y)/(1000 * 60 * 60 * 24);};
To this:
var hours=function(x,y){return diff(x,y)/(1000 * 60 * 60);};
2) Are you sure the calculation is incorrect? Have you calculated what it should be manually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 06:15 AM
A couple of notes:
1) Your calculation calculates days, but your unit displayed is hours. If you want it in hours, you need to change this line:
var hours=function(x,y){return diff(x,y)/(1000 * 60 * 60 * 24);};
To this:
var hours=function(x,y){return diff(x,y)/(1000 * 60 * 60);};
2) Are you sure the calculation is incorrect? Have you calculated what it should be manually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 07:08 AM
I'm highly suspicious of your indicator source. Are you sure it is historically safe to collect? What do the count indicators show?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2018 11:30 PM
If you are looking for wall clock duration (not business duration), take a look Database Functions to calculate the datediff: https://docs.servicenow.com/bundle/kingston-application-development/page/build/platform-functions/ta...
You also might consider a field (or scripted metric) that calculates this duration whenever the RCA delivery date. By adding a new field, you would be able to use this in reports (as a condition or displaying it) and in PA. If you do it in a PA script, you can only use it in PA. For some data (like how long something has been open), PA is a good fit, but in many other cases, you really want to consider looking at a field or metric to store the duration.