How can i add a field in the aggregation average fields in performance analytics indicator?

Koyel Guha
Tera Contributor

Hello Team,

Need help to add one field in the aggregate Average filed.I need to create an indicator with average business elapsed time.However i am not getting the aggregate field "Business elapsed time" to calculate the average.

If i take the facts table as "INCIDENT" - i am getting the business elapsed time to calculate the average in aggregation.

I have created a new table "u_incident_last_domain_log" where i need to do dot walking from TaskSLAfields to calculate the average of business elapsed time.

Could you please help me to add this field "business elapsed time" which is available in task sla field by doing dot walking.

Could you please suggest if any script required for doing the same?

In real time report,i can easily get the average of business elapsed time through dot walking using u_incident_last_domain_log table. Refer screenshot below :

find_real_file.png

In Performance analytics indicator,its now allowing me to do the same.

find_real_file.png

Can anybody please help me with this ?

Thank You in Advance.

4 REPLIES 4

Slawek_Radziewi
Kilo Sage

You have two solutions.

1. Create a source which has this field in table so you don't have to do dot.walking here. 

2. Add here scripted fields and calculate this value yourself. 

 

i.e. I am calculating average using formula and two indicators:

find_real_file.png

We can use field which is on incident table

 

find_real_file.png

Or we can calculate using script.

find_real_file.png

 

And then divide by number of all tickets.

find_real_file.png

 

 

 

 

 

 

 

 

Adam Stout
ServiceNow Employee
ServiceNow Employee

If you can dot walk to it, change your indicator to a scripted indicator and the script will be one line.

 

current.u_incident_last_domain_log.elapsed_time

 

Or whatever the dot walked field is.  Be sure you pass this value to the script in the selected fields.

Hi Adam,

I have taken the aggregate as average and created a script but I am not getting the correct average scores.

Could you please help me with this ?

Here is the script which I have applied :

 

find_real_file.png

This script calculates duration but you already have it.  Make the line a one-line script:

 

current.u_sla_task.business_duration;

 

Or you can calculate the duration on the fly (which you would do if you didn't have a duration field).  This would also make it historically safe and would work on non-completed tasks (which don't have the duration complete yet).  

Do you always only have one SLA per incident?