# Issues with nested if (condition) function

Hello to all
I have issues with the if function and < or and >= parameters.
I have made some calculation for calculating ABI (ankle brachial index). I got this value corectly.The issue is I would like to classify the response in categories and I cannot make it work…
example= if(( \${cal_abi_right} < 0.5), ‘Severe arterial disease’, if((0.5 <= \${cal_abi_right} < 0.8), ‘Moderate arterial disease’, if((0.8 <= \${cal_abi_right} < 0.9), ‘Some arterial disease’, if ((0.0 <= \${cal_abi_right} < 1), ‘Acceptable’, if ((1.0 <= \${cal_abi_right} < 1.4), ‘Normal’,‘na’)))))
Aline_issue_if function.xlsx (11.4 KB)
Regards Aline

Maybe this post discussed previously should also be helpful to solve your issue:

If you are however not able to solve your issue please provide us the list of conditions (in a simple descriptive form) so that we could have a look at your conditions. Maybe you could list it out as follows …

value range from … to …: Severe
value range from … to …: Moderate
value range from … to …: …

An ankle-brachial index (ABI) test is a simple way for your doctor to check how well your blood is flowing.They use this test to check for peripheral artery disease (PAD). Stiff arteries are another issue

Value : range from 0 to 0.5 : severe pad

Value : range from 0.5 (included) to 0.8 : moderate pad

Value : range from 0.8 (included) to 0.9 :minimal pad

Value : range from 0.9 (included) to 1 : acceptable pad

Value : range from 1 (included) to 1.4 : no problems

=1.4 : stiff arteries

THANK YOU

Aline_issue_if function.xlsx (11.4 KB)

Kal_Lam Core Team
March 19

Could you simply list out the condition (in a simple descriptive form) so that we could have a look at your conditions. Maybe you could list it out as follows …

value range from … to …: Severe
value range from … to …: Moderate
value range from … to …: …

Visit Topic or reply to this email to respond.

An ankle-brachial index (ABI) test is a simple way for your doctor to check how well your blood is flowing.They use this test to check for peripheral artery disease (PAD). Stiff arteries are another issue

Value : range from 0 to 0.5 : severe pad

Value : range from 0.5 (included) to 0.8 : moderate pad

Value : range from 0.8 (included) to 0.9 :minimal pad

Value : range from 0.9 (included) to 1 : acceptable pad

Value : range from 1 (included) to 1.4 : no problems

=1.4 : stiff arteries

THANK YOU

Is there a possibility that the value should not exceed 1.4?

I should have written >= 1.4…we put other or whatever
sorry

1 Like

@alinephilibert, apart from the nested `if-statements`, I could also see some typos within your xlsform. I have fixed them (as shown in the image below) and it should now work:

#### Referecne xlsform:

Aline_issue_if function.xlsx (12.4 KB)

1 Like

thank you!!!

1 Like