Answered

multiply two variables to create a total score variable

  • 22 March 2023
  • 2 replies
  • 107 views

Creating a risk assessment and need to do severity x likelihood = score

 

Current set up (each section, of which there are 36 sections)

  • users select drop down risk severity: “very low, low, medium, high, very high” with 1-5 score attached to each
  • This total has a variable output “Var_1”
  • users then select drop risk likelihood: “very low, low, medium, high, very high” with 1-5 score attached to each
  • This total has a variable output “Var_2”

Then i get stuck, what i want to do then is

  • I need to multiply “Var_1” x “Var_2” and output score to new variable “Var_3”
  • I then need to recall this variable (Var_3) to tell users their risk score
  • The user then needs to mitigate or justify the risk in long text format
  • I then need to recall “Var_3” again, and ask the user if their mitigation or justification is strong enough to reduce this score to an acceptable level by asking them to input a new score which I want to become a new variable, “Var_4”

 

There are 36 separate risks, at the end i want to call all the Var_4 for each section (which will be “Var_8, Var_12, Var_16, etc.) and give them an overall score for each section. It would be amazing to then give an overall score in “Var_total” 

 

I may well be going about this wrong, the main problem to solve is severity x likelihood = score, however if someone has a smarter, more logical and lower effort approach I would be really grateful!

icon

Best answer by john.desborough 22 March 2023, 22:09

View original

2 replies

Userlevel 7
Badge +6

@Kieronm - start your logic this way: 

  • if var1 gt 0 add var1 to var3
  • if var2 gt 0 multiply var3 by var2 (sets the var3 variable to v1*v2)

to recall the info to the user, use the @var3 in your form - that recall structure will display the info the user

 

then use a yes/no question to say - do you want to change your var3 answer?

if yes, enter the new data into the next question

if no, var3 is your number

 

does that help or make sense

 

des

Perfect! thank you so much, works beautifully

Reply