Hi Everyone, Im new to Alteryx and trying to do a change within one field dependent on a number of the other fields. The formula I have so far is this
IIF([ServiceLine] = "Tax" AND ([Sector] = "Life Sciences" OR "Professional Firms & Services" OR "RE, Hospitality & Construction") AND [FSO WAM Filter] = "Other" , "UK Additions - Tax" , [FSO WAM Filter] )
Im looking for all rows where ServiceLine = Tax, FSO WAM Filter = Other and then Sector equals either "Life Sciences" OR "Professional Firms & Services" OR "RE, Hospitality & Construction" but this doesnt seem to work, any ideas?
Regards
Jon
Solved! Go to Solution.
Try this:
IIF([ServiceLine] = "Tax" AND ([Sector] = "Life Sciences" OR "Professional Firms & Services" OR "RE, Hospitality & Construction") AND [FSO WAM Filter] = "Other")
THEN "UK Additions - Tax"
ELSE [FSO WAM Filter]
ENDIF
Hello Jon!
Would something like this work:
IIF ([ServiceLine] = "Tax" AND ([Sector] IN ("Life Sciences","Professional Firms & Services","RE, Hospitality & Construction")) AND [FSO WAM Filter] = "Other" , "UK Additions - Tax" , [FSO WAM Filter] )
Using "IN"
If that doesn't work, you may need to repeat your OR statements like this (not 100% sure on this):
IIF([ServiceLine] = "Tax"
AND
([Sector] = "Life Sciences" OR
[Sector] ="Professional Firms & Services" OR
[Sector] ="RE, Hospitality & Construction")
AND
[FSO WAM Filter] = "Other")
THEN "UK Additions - Tax"
ELSE [FSO WAM Filter]
ENDIF
I agree with repeating the OR statements (or using IN()).
Just be sure not to mix up IIF syntax (which doesn't require a then or endif) with IF syntax (which does).
IIF syntax: IIF(Expression, Then, Else)
IIF([ServiceLine]=='Tax','Tax','Not Tax')
IF syntax: IF Expression THEN Result ELSE Fallback ENDIF
IF [ServiceLine]=='Tax' THEN 'Tax' ELSE 'Not Tax' ENDIF
Thanks for the clarification on IIF vs IF! :-)
Hi,
What the Syntax to take difference in boolean logic.
eg:
if Amount 1 == Amount2
Then True
Else
Amount1=Amount 2
I need in iff format as how we write.
Same for Date also the Difference.
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |