Performance analytics score based on value

Dorrizthomaz
Tera Contributor

Hello,

I actually watched a couple videos that were sponsored and hosted by servicenow SMEs and based on the requirements I think I’m close, yet so far away. The amount of hours I’ve spent trying to figure this out is ridiculous to say the least.

 

definition: provide score based on tasks over a certain metric duration.

[works]

automated indicator ran daily:

duration in days of records in state “x”. (Using the related metric table for the start & end values) 

 

[DOES NOT WORK]

Score =
if score value from inductor = 10 days, score 1

if score value from inflator = 9-7 days, score 2

if score value form indicator = 8-5 days, score is 3

if score value from indicator = 4-2 days, score =4

if score from indicator = <2 days, score is 5


From a “summary standpoint I know I can use a bucket, however the pain part of the requirement is to see a total “score” on record “assigned to”. (Breakdown)

 

I tried the indexing method from a videos, however idk if it’s because I’m looking at things already over the logical target, but I’m struggling to make mathematical scenes if it.


PLEASE HELP

1 REPLY 1

You're definitely right on with what I'm attempting to accomplish. 
Couple clarifying questions to get this to work. 
1) Attached is a screen shot of my script indicator. I'm using a condition to find the "state" I'm attempting to measure. 
2) In the script named "task.duration", i'm setting the end (mi.end) to the score end, this way i can see running duration daily. How/where should the 2 lines you mentioned for the indicator script be inserted/named? 
3) For my script include, would i change 'duration' to the name of the indicator script, or the field which i initially pulled from (mi_duration)

Sorry for needing this oversimplified and I really appreciate your help.