New Incidents Backlogs Per Week- Performance Analytics

supriya pratapa
Tera Guru

I want to display incidents that are in the "New" state, and at the top of each bar, I’d like to show the number of days the incident has been in the new state, calculated as (today’s date – created date). Is this possible to achieve in Performance Analytics (PA)?

1 REPLY 1

pavani_paluri
Tera Guru
Tera Guru

Hi @supriya pratapa ,

 

Create an Indicator
- Go to Performance Analytics > Indicators.
- Create a new indicator based on the Incident table.
- Add a filter: State = New.
Add a Scripted Calculation
To calculate how many days each incident has been in the "New" state:
- Use a Scripted Indicator or Formula Indicator.
- Sample script:
var createdDate = new GlideDateTime(current.sys_created_on);
var now = new GlideDateTime();
var duration = GlideDateTime.subtract(now, createdDate);
answer = Math.floor(duration.getNumericValue() / (1000 * 60 * 60 * 24)); // Convert ms to days
Configure the Widget
- Use a bar chart widget in a dashboard.
- Set the indicator as the data source.
- Enable data labels to show the number of days on top of each bar.
- You can also use tooltips to show extra info when hovering over a bar.
Schedule Data Collection
- Make sure your indicator collects data daily so the chart stays updated.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P