Nested if statements

Hi,
Here is the revised syntax that I used and it worked:
if((${high_risk}>=4),“4”, if((${high_risk}=3 or ${medium_risk}>=11),“3”, if(((${high_risk}=2 or ${high_risk}=1 or ${medium_risk}<=10) and ${medium_risk}>0),“2”,“1”)))

  1. If high risk is>=4 so the calculated value should be 4.

  2. If high risk =3 or medium risk>=1, then the calculated value should be 3

  3. If high risk=2 or 1, or medium risk<=10 and >0, the calculated value should be 2

  4. In case none of above conditions are met, the calculated value should be 1.

Please let me know if there is a better way or simplified version of the syntax that I can use.
Thanks

1 Like