Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

If then statement issue

garretwalters12
8 - Asteroid

Why when I use the following if then statement, I am receiving a "0" instead of "NY" when true?

 

 fomula.PNGoutcome.PNG

2 REPLIES 2
DavidP
17 - Castor
17 - Castor

Change you if statement to this:

 

if Contains([Item-Txt1],'NYC' then 'NY' else {Item-Txt2] endif

Kenda
16 - Nebula
16 - Nebula

Hi @garretwalters12

 

Try taking out the [Item-Txt2]= between your then and 'NY' so that your formula just reads

if contains([Item-Txt1], 'NYC') then 'NY' else [Item-Txt2] endif

 

In Alteryx, you are specifying what column to change with the drop down at the top so you don't have to do it in your expression.

 

Hope this helps!

Labels