Hi, I want to create a filter that excludes data IF
Column A = X OR Y OR Z
AND
Column B = 0
Any help on this would be great!
Solved! Go to Solution.
Hi @taraohare,
You could use the IN() function:
[Column A] IN ("X", "Y", "Z") AND [Column B] = 0
If this solves your issue please mark the answer as correct, if not let me know!
Regards,
Jonathan
You can put all the OR statements in brackets
([Column A] = X OR [Column A] = Y OR [Column A] = Z) AND [Column B = 0]
Hi Jonathan,
I am getting a 'Parse Error at Char (85): Malformed if statement' when i use the below:
IF [Transaction Code] IN ("CEXP", "CEXP-", "RCEXP") AND [Real FX GL on Rec Pay] = 0 ENDIF
Can you see whats going wrong here?
Hi @taraohare,
If you've got this expression in a filter tool you'll need it to be a boolean expression and not an IF statement, try changing it to:
[Transaction Code] IN ("CEXP", "CEXP-", "RCEXP") AND [Real FX GL on Rec Pay] = 0
If this solves your issue please mark the answer as correct, if not let me know!
Regards,
Jonathan
you need a THEN clause and an ELSE clause
Each IF condition requires an ELSE clause, even if the ELSE value is Null()
Here is a list of all functions: https://help.alteryx.com/current/Reference/Functions.htm
The IF function is the first one listed under the section for Conditional
Chris