SOLVED
Multiple "IF" conditions
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
kmontoya
7 - Meteor
‎01-30-2025
12:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I have a set of data that needs to have filters and categorize it from excluded or included based on multiple things. Is there a way I can create a key or legend in alteryx to have this flow?
For example, If
- "instrument type" = cashflow - "excluded"
- "exchange" = AVG or GTO = "Excluded"
- anything else needs to say included
thank you in advance!
Solved! Go to Solution.
Labels:
- Labels:
- Best Practices
- Tips and Tricks
- Workflow
2 REPLIES 2
17 - Castor
‎01-30-2025
12:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@kmontoya Try something along these lines:
IF [instrument type] = "cashflow" or [exchange] in ("AVG","GTO") then "Excluded" else "Included" endif
KGT
12 - Quasar
‎01-30-2025
02:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The formula above is easiest.
If you have a list of 75 items, that may not work. I would do this by creating a look-up table and then use a find replace to append the include/exclude.
The lookup table would be like this:
Field | Term | Decision |
instrument type | cashflow | Exclude |
Then either use that trickily on the whole set at once, or use a filter for each [Field] term and apply once at a time.
- Once at a time would need to consider how to evaluate whether each row is include/exclude. I would use record ID, Summarise(Concatenate) and a formula for IIF(Contains([concat_decision],"excluded"),"Excluded","Included")
