Display results in ranges with IF

Best regards dear colleagues

I need to show results according to rank and I can’t figure out how to do it.

I need this:

= 120% Obese
110-119% Overweight
90-109% Normal
80-89% Acute Malnutrition
70-79% Moderate Acute Malnutrition
< 69% Severe Acute Malnutrition

Try this:

if(${nutri4}>=110 and ${nutri4}<=119,‘Overweight’, if(${nutri4}>=90 and ${nutri4}<=109,‘Normal’, if(${nutri4}>=80 and {{nutri4}<=89,‘Acute Malnutrition’, if(${nutri4}>=70 and ${nutri4}<=79,‘Moderate acute malnutrition’, if(${nutri4}<89,‘Severe acute malnutrition’, ’ ‘, if(${nutri4}<120,‘Obsessive’,’ '))))))

I hope you can help me. Thanks in advance.

Welcome to the community, @chirinoskobo! Maybe try this out:

if(${nutri4}<=69,'Severe Acute Malnutrition', if((${nutri4}>=70 and ${nutri4}<=79),'Moderate Acute Malnutrition', if((${nutri4}>=80 and ${nutri4}<=89),'Acute Malnutrition', if((${nutri4}>=90 and ${nutri4}<=109),'Normal', if((${nutri4}>=110 and ${nutri4}<=119),'Overweight',if(${nutri4}>=120,'Obese',''))))))

Survey tab of your XLSform:

Data entry screen as seen in Enketo:

Reference XLSForm:

Calculation.xlsx (9.1 KB)