Skip to main content
Answer

multiply two variables to create a total score variable

  • March 22, 2023
  • 2 replies
  • 177 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!

Best answer by john.desborough

@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

2 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • Answer
  • March 22, 2023

@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


  • Author
  • Explorer
  • March 23, 2023

Perfect! thank you so much, works beautifully