Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

IF AND formula

insomned
8 - Asteroid

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! 

2 REPLIES 2
Emil_Kos
17 - Castor
17 - Castor

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. 

atcodedog05
22 - Nova
22 - Nova

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

https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...

 

Hope this helps : )

Labels
Top Solution Authors