AnsweredAssumed Answered

Right syntax for setting up ranges or intervals

Question asked by navarro on Mar 5, 2018
Latest reply on Mar 5, 2018 by beverly

Hello,

 

I am having trouble finding the right syntax for setting up ranges or intervals within the Case function.

 

Depending on the BMI value that you get you are assigned to a risk group as shown is the following picture.

 

body-mass-index-waist-hip-ratio-6-638.jpg

 

The Risk field (calculation; calculation result is Text) contains the following calculation.

 

Here is how I set up the Case function:

 

Case (

 

BMI < 18,5; "Underweight";

BMI < 16; "Severe thinnness";

16 < BMI < 16,99; "Moderate thinnness";

17 < BMI < 18,49; "Mild thinnness";

18,5 < BMI < 24,99; "Normal";

25 ≤ BMI; "Overweight";

25 < BMI < 29,99; "Pre-obese";

30 ≤ BMI; "Obese";

30 < BMI < 34,99; "Obese class I";

35 < BMI < 39,99; "Obese class II";

40 ≤ BMI; "Obese class III"

 

)

 

So for an BMI = 27 I am getting "Moderate thinness" instead of "Pre-obese"

 

So my question is what is the right syntax for a range or interval using the Case function?

 

Certainly the following  expression: 25 < BMI < 29,99; "Pre-obese"; is not working.

 

Thanks

Outcomes