Report on Incidents to show Percentage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 09:51 AM
Hello Experts,
I wanted to have a report on incidents which should show the total count of incidents opened in a month and also total number of incidents resolved/closed on first call and also need to show how much percentage of incidents are closed on first call.
How can I achieve this?
Any help is appreciated.
Thanks,
Rocky.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 10:05 AM
If you are looking to add all the 3 calculations in 1 report, I would suggest creating a UI page that does all the calculations and prints the percentages/amount.
Then creating a Gauge of type URL (which can be added to a dashboard) and referencing this UI page you created in the previous step.
Set the URL field of the Gauge to
ui_page.do?sys_id=<SYSID OF UI PAGE>
Sample UI Page script (You will need to add couple more gliderecords):
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true" var = "jvar_getpercentage" >
//Percentage Formula = (initial number)/(total number) * 100
//Get Total Number
var allIncGR = new GlideRecord("incident");
allIncGR.addEncodedQuery(sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday());
allIncGR.query();
var allIncCount = allIncGR.getRowCount();
//Get Initial Number
var activeIncGR = new GlideRecord("incident");
activeIncGR.addEncodedQuery(sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()^stateIN1,2,3);
activeIncGR.query();
var activeIncCount = activeIncGR.getRowCount();
//Get Percentage
var percentage = activeIncCount/allIncCount * 100;
//Add Percent symbol
percentage = percentage+ "%";
percentage;
</g:evaluate>
<h2 style="color:red; text-align:center">${jvar_getpercentage}</h2>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 11:24 AM
You need to be using Performance Analytics for a few reasons.
1) The numbers need to be measured in intervals. What's true now only matters in the context of what was true yesterday.
2) You're dealing storing and presenting aggregations, not grouping queries (traditional reports). Performance Analytics provides hte mechanism for creating "Indicators". Every interval the indicator will get you either an aggregate of a data set, (or a formula based on other indicators) and store that in a cell.
3) You'll most assuredly need to break down these results by different criteria (priority, category, group, etc), and that's where Performance Analytics Breakdowns will make your life a whole lot easier.
The distance between 2 and 3 will happen faster than you realize, and that's why I respecfully disagree with advice around "add custom fields and make custom UIs'" Sooner or later (sooner), that won't scale.