CALCULATION: IF

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
  • December 11, 2019 at 3:58 AM #38636

    4 trade
    Participant

    I have a field with Height
    I have a field with Weight
    I have a 3rd field calculating BMI (Body Mass Index) out of the 2 former fields

    I want a 4th field using a condition: If value from the Calculated field BMI is below a certain value, it says Undernourishment, else No Undernourishment

    I tried IF ([BMI]<18.5;”UNDERNOURISHMENT”;”NO UNDERNOURISHMENT”) and it does not work with TAP FORMS 5 for iOS (I am not using TAP FORMS for MACOS)

    My second question would be how to get a condition like If Condition 1 then (…); IF Condition 2 then (…); IF Condition 3 then (…) etc

    Thanks

    December 11, 2019 at 2:13 PM #38658

    Brendan
    Keymaster

    Hi 4 Trade,

    Your formula should work fine on iOS. Make sure you set the Result Type to Text since you’re returning text. That’s the T next to the Result Type field option. The default is Number.

    For multiple conditions you’ll need to nest them.

    IF(Condition1; IF(Condition2; IF(Condition3; Then ; Else) ; Else) ; Else )

    December 15, 2019 at 7:54 PM #38748

    john cesta
    Participant

    Make sure you pull in the fields thru tapforms and don’t type them in.

    January 3, 2020 at 10:42 AM #39073

    4 trade
    Participant

    Thank you guys for your replies but I can’t figure out the proper syntax; I have tried everything…

    I have a number field called BMI

    I make a calculation field named Malnourishment set to T as advised

    I want my field Malnourishment to tell me “yes” or “no” according to BMI field value (< or > 21)

    IF ([BMI] <21; THEN “Yes”; ELSE “No”) does not work

    Tried with or without parentheses, “” etc

    Any idea?

    Thanks!

    January 3, 2020 at 11:20 AM #39075

    4 trade
    Participant

    Just found out: no THEN; No ELSE needed

    Field Malnourishment set to T
    IF ([BMI]<21; “YES”; “NO”)

    January 3, 2020 at 1:08 PM #39076

    Brendan
    Keymaster

    My example was just showing you where you would put the else part and the then part, not that you used those keywords in the formula. Sorry for the confusion.

    I’m glad you found the solution.

Viewing 5 reply threads

You must be logged in to reply to this topic.