Alteryx Designer Desktop Discussions

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

IF AND formula

insomned
Asteroide

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 RESPOSTAS 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 : )

Rótulos