What is score end in Performance Analytics scripts

mdsannavulla
Kilo Guru

Hi All,

Ca anyone tell me what is 'score end' in below screen shot.

What is the second field name we have to select here (one is Opened and next on is what ?, by default only one field Opened is came here)

PA.png

5 REPLIES 5

srinivasthelu
Tera Guru

From Wiki.



Scripts for Automated Breakdowns

As mentioned above, you can choose to use a script to create a virtual grouping. The following specific functions can be added to the standard script functionality for Performance Analytics:


  • score_start: start of the collection period.
  • score_end: end of the collection period.

Example script for calculating the age of open incidents:



var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();}; var days=function(x,y){return diff(x,y)/(24*60*60*1000);}; days(current.opened_at, score_end)



Link:Creating Breakdowns - ServiceNow Wiki


Could you please tell me from where this Score end is coming and how it is calculating age of incidents


I interpret this as:   Score_end will be the end of the collection period, so if the collection period was yesterday, then score_end would equal 23:59:59 of yesterday's date.   Then age would be calculated as the difference from yesterday at 23:59:59 - the date the incident was opened.


Hi: Does score_end not take into account SLAs and working hours?