Hello All,
I'm very new to Alteryx and I'm trying to assign a category to separate values. My table is below.
BU | Flex 1 |
648 | |
BE | |
CE | |
TE | |
645 |
In column Flex 1, I'm trying to assign "US" to BE, CE, and TE and also assign "4N" to 648 and 645. This is just a sample so my BU column is significant.
I've tried the formula tool using the IF/ELSE (If [BU]="BE" or "CE" or "TE" then "US" else "4N" endif) statement but the entire BU column shows only as US or 4N depending on whether I use OR or AND.
I'd be grateful for any help.
Thanks!
Hi @CS382,
Your syntax is off a little. You need to include the relevant column in each of your "Or" clauses. Try these alternatives:
If [BU]="BE" or [BU]="CE" or [BU]="TE" then "US" else "4N" endif
Less code:
IIF([BU] in ('BE', 'CE', 'TE'), 'US', '4N')
Thank you so much! It worked perfectly!