I need some help working on a nested iif statement. Essentially, I need the logic to read like below. How do i get the multiple conditions per IIF statement to work correctly? and how do I get the multiple IIF statements to work together in one formula? I can get one IIF statement to work but not all of them together.
IIF([OTYP] = "OUTBOUND,RETURN","OUTBOUND,TRANSFER","OUTBOUND", IIF([OTYP] = "RETURN,OUTBOUND", "RETURN,TRANSFER" , "TRANSFER" IIF([OTYP] = "TRANSFER,OUTBOUND", "TRANSFER,RETURN", "TRANSFER")
Solved! Go to Solution.
Hi @czjames87
IIF statement goes like
IIF(condition, true, false)
Nested IIF(condition, IIF(condition, true, false), false)
Or
IIF(condition, true, IIF(condition, true, false))
IIF([OTYP] = "OUTBOUND,RETURN","OUTBOUND,TRANSFER","OUTBOUND", IIF
Has more argument then allowed
Hope this helps 🙂
@czjames87 you may also find that writing the conditional out using the following syntax might make it a bit easier to structure
IF
THEN
ELSEIF
THEN
ELSE
ENDIF
Here is some additional documentation on conditional functions: https://help.alteryx.com/current/designer/conditional-functions