Hi,
I am trying to use multiple "IF" formulas on a data set but it is only picking up the last formula (ICCT4 - as seen in results window)
SOS!
Solved! Go to Solution.
You can use a switch formula: Switch(Value,Default,Case1,Result1,...,CaseN,ResultN) instead of multiple if.
https://help.alteryx.com/2018.2/Reference/Functions.htm
@WilliamR wrote:You can use a switch formula: Switch(Value,Default,Case1,Result1,...,CaseN,ResultN) instead of multiple if.
https://help.alteryx.com/2018.2/Reference/Functions.htm
Hi William,
Thanks for getting back to me.
How would the Switch formula work as I can't seem to figure out what the Default, CaseN fields would include?
Thanks!
You can also use ELSEIF.
So you could put all 4 of those into one:
IF [Zeus] = "265" THEN "ICCT1" ELSEIF [Zeus] = "266" THEN "ICCT2" ELSEIF [Zeus] = "290" THEN "ICCT3" ELSEIF [Zeus] = "190" THEN "ICCT4" ELSE "pending" ENDIF
Hi @emiafshar,
the syntax would be
Switch([Zeus],Null(),265,"ICCT1",266,"ICCT2",290,"ICCT3",....)
The Default value is used in the case where there is no associated value for one record, the default value would be used, so you can replace Null() by the value you want in this case.
Hope this help.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |