IF AND formula
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
insomned
8 - Asteroid
‎08-30-2021
06:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello, I'm writing an IF formula, which would also include AND - if column A=X and column B=Y, then..., how could I do this in Alteryx? Thanks!
Labels:
- Labels:
- Developer
2 REPLIES 2
17 - Castor
‎08-30-2021
06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @insomned,
I think you need to write something like IF [Column A] = [Column x] AND [Column B] = [Column Y] Then 1 ELSE 0 ENDIF
In [] you need to have proper column names.
22 - Nova
‎08-30-2021
07:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @insomned
Just another way the question could be looked at say "X" and "Y" are strings and not columns. Formula would be
IF [Column A] = "X" AND [Column B] = "Y"
Then 1 ELSE 0 ENDIF
These resources might be helpful
https://community.alteryx.com/t5/Interactive-Lessons/Writing-Conditional-Statements/ta-p/98910
Hope this helps : )
