- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2021 11:53 PM
Hi,
Can someone advise the script needed in Performance Analytics to calculate the duration between two fields. For example I would like to calculate the duration between when the incident was opened and when it was assigned to someone.
Thank you in advance.
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2021 09:53 AM
For time to assignment metrics, I prefer leveraging an SLA since this will allow me to easily calculate business time in addition to absolute time. Reporting on SLAs is then pretty straight-forward.
If you don't go down this path, you need a Performance Analytics script to perform this calculation per row. This cannot be done in a Formula since they operate on aggregates.
There should be examples available OOTB based on resolved time. Just be sure to handle unassigned tasks as well (with score_start) or exclude them from your indicator. This is the primary use case for Performance Analytics scripts and can also be found in the docs: https://docs.servicenow.com/csh?version=latest&topicname=pa-scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2021 12:18 AM
its already available OOB in Metric table. you can create your report using this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2021 12:25 AM
Hi,
I am aware that both the fields and their time stamps are on the metric table but how do you calculate the difference in a report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2021 12:40 AM
Difference reflects in field named as Duration. for creating report from this, database view needs to be created from Incident, metric instance & definition. Report can be created then by using duration field.
you can look for OOB db view for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2021 12:45 AM
I am in reporting not application support so can not create new fields in the system, hence the question of how to calculate the difference within performance analytic reports.