Forum Discussion
MikeMike
6 years agoQrew Cadet
In a formula field you can put multiple conditions into your IF statement, eg:
Basically this says if the value of Field1 is "N/A" then divide Field2 by 5, otherwise if the value of Field1 is "Yes", then divide Field2 by 3, otherwise if the value of Field1 is "No" then divide Field2 by 10. If all the above are false then make the value 0.
All of these different criteria can be changed to suit your requirements.
IF(
[Field1] = "N/A", [Field2]/5,
[Field1] = "Yes", [Field2]/3,
[Field1] = "No", [Field2]/10,
0
)
Basically this says if the value of Field1 is "N/A" then divide Field2 by 5, otherwise if the value of Field1 is "Yes", then divide Field2 by 3, otherwise if the value of Field1 is "No" then divide Field2 by 10. If all the above are false then make the value 0.
All of these different criteria can be changed to suit your requirements.
- TabindaTariq6 years agoQrew TraineeI tried that, but because the values of the "N/A" fields vary (some are worth 2, some worth 5, etc.), and there are 7 of them, once the first condition is met, the form calculates the % based on the Total Value associated with that "N/A" condition and none of the others are calculated.
What I need is to calculate the Total Value based on the combination of any of the conditions being true.
Not sure it's even doable at this point :( - MikeMike6 years agoQrew CadetYou can do an "and" in your query, something like this:
IF([Field1]="N/A" and [Field2]=5, 20, [Field1]="N/A" and [Field2]=7, 30, [Field1]="Yes" and [Field2]=10, 50, 0)
This example sets the value to 20 if Field1 is N/A and Field2 is 5, and sets the value to 30 if Field1 is N/A and Field2 is 7. - TabindaTariq6 years agoQrew TraineeI will try that out and let you know, thanks for the feedback!