Inherent Likelihood calculation using a group factor - scripted factor

Varun Sai
Tera Contributor

We have recently implemented Advanced Risk and fairly new to the different factors that are there. In a requirement for calculating the Inherent Likelihood, I have a group factor with about 6 manual factors which are grouped under Likelihood group factor. 

I need the below formula to be implemented - this is general terms, I am trying to see how to get this one to work in the script.

For each of the factor there is weight like 0.5, 2.5, 1.5.

Each factor has it's own weight to be multiplied like below - Factory Responses (Yes - 1, No -2)

FAC0001001 (Factor responses) * 0.5;
FAC0001002 (Factor responses)* 2.5;
FAC0001003 (Factor responses) * 0.5;
FAC0001004 (Factor responses) * 0.5;
FAC0001005 (Factor responses) * 2.5;
FAC0001006 (Factor responses) * 1.5;

 

We need to add all the factors results in the end and if there is a decimal need to round it up.

 

Example :

V1 = FAC0001001 (Yes:2) * 0.5 = 1
V2 = FAC0001002 (Yes:1)* 2.5 = 2.5
V3 = FAC0001003 (No:2) * 0.5 = 1
V4 = FAC0001004 (Yes:1) * 0.5 = 0.5
V5 = FAC0001005 (Yes:1) * 2.5 = 2.5
V6 = FAC0001006 (No:2) * 1.5 = 3
 

Total Score = V1+V2+V3+V4+V5+V6 = 10.5, but needs to round up to 11

Score = 11, this should be the Likelihood score. 

 

I am not understanding how to implement this and did not find enough examples for me to refer to.

Any help is greatly appreciated.

 

@Amit Gujarathi tagging you if you can take a look as I see you have some experience on this. any pointers would help me.

1 ACCEPTED SOLUTION

ThineshT
ServiceNow Employee
ServiceNow Employee

Hi Varun,

 

You can follow the below steps to archive your use case;

1. Create 6 manual factors with following setup

  • Choices as
    • Yes with score 1
    • No with Score 2
  • And for each choice provide your qualitative weighting. For example based on your example above you need to add below qualitative weight percentage for respective factors;
    • FAC0001001  - 50%
      FAC0001002 - 250%
      FAC0001003 - 50%
      FAC0001004 - 50%
      FAC0001005 - 250
      FAC0001006 - 150%
      ThineshT_2-1740122863595.png

       

  • Create a group factor and include all these manual factors underneath it and in the field formula for qualitative score, select Script and in the script area can you add the below formula for score "score = Math.round(FAC0001003+FAC0001004+FAC0001008+FAC0001005+FAC0001006+FAC0001007);"
  • math.round will help you to achieve the nearest integer

ThineshT_0-1740122713336.png

Based on the following configuration i was able to achieve the score of 11 by following your example factors responses and the configurations mentioned above;

ThineshT_1-1740122795953.png

Let me know if you need any further clarifications.

 

Thanks,

Thinesh

 

 

 

 

View solution in original post

5 REPLIES 5

ThineshT
ServiceNow Employee
ServiceNow Employee

Hi Varun,

 

You can follow the below steps to archive your use case;

1. Create 6 manual factors with following setup

  • Choices as
    • Yes with score 1
    • No with Score 2
  • And for each choice provide your qualitative weighting. For example based on your example above you need to add below qualitative weight percentage for respective factors;
    • FAC0001001  - 50%
      FAC0001002 - 250%
      FAC0001003 - 50%
      FAC0001004 - 50%
      FAC0001005 - 250
      FAC0001006 - 150%
      ThineshT_2-1740122863595.png

       

  • Create a group factor and include all these manual factors underneath it and in the field formula for qualitative score, select Script and in the script area can you add the below formula for score "score = Math.round(FAC0001003+FAC0001004+FAC0001008+FAC0001005+FAC0001006+FAC0001007);"
  • math.round will help you to achieve the nearest integer

ThineshT_0-1740122713336.png

Based on the following configuration i was able to achieve the score of 11 by following your example factors responses and the configurations mentioned above;

ThineshT_1-1740122795953.png

Let me know if you need any further clarifications.

 

Thanks,

Thinesh

 

 

 

 

Varun Sai
Tera Contributor

@ThineshT Thank you very much. I didn't know it was this simple, I was creating all kinds scripts and queries for Automated scripted factors for close to 2 days. LOL!

 

I don't think there is enough information in the product docs to see that the factor is multiplied by Qualitative weightage or I didn't assume it was a given that it multiplies the responses with the weightage.

Varun Sai
Tera Contributor

@ThineshT  

Can I ask you a follow up question on this?

I am calculating the Inherent assessment based on the product of Impact and Likelihood.

Based on any score that I get from Likelihood and multiplying it with Impact is giving me more than 80 or 90 in the score. 

I have look up matrix which can go only till 49 in score. and I need to set these values. 

1-6 = Low

7- 17 = Medium

18 - 49 = High

 

Would I be creating a new scripted factor for this and getting the score from the Likelihood and multiplying that automated scripted factor with Impact?

 

Please suggest or advise. let me know if I need to provide more clarifications.

 

 

 

ThineshT
ServiceNow Employee
ServiceNow Employee

@Varun Sai Based on the info provided by you in the initial question details,

For likelihood;

 

  • Minimum Possible Score: 8
  • Maximum Possible Score: 16

Can you Share me the minimum & maximum possible score for Impact as well? Also can you provide us details on how your impact score will be calculated?
Based on your above response only we can understand what would be your maximum and minimum final risk score (Final risk score = Impact * Likelihood) and suggest on the risk matrix ?

 

Thanks,

Thinesh