Alteryx Designer Discussions

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

IF ELSE STATEMENTS

AmritJ
5 - Atom

Hi Community,

 

I am a fairly new user of Alteryx and would greatly appreciate any input on the recent IF statement problem that I am having.

It's a fairly simple one-

 

AmritJ_0-1583433820880.png

 

What am I doing wrong?

 

Thanks,

6 REPLIES 6
JosephSerpis
16 - Nebula
16 - Nebula

Hi @AmritJ replace "BLANK" with Null() 

alex
11 - Bolide

No need for Null() if you if you are trying to get the word BLANK in your results.  Check Div Code data prior to your formula tool.  I tested the formula and it worked fine with my dummy data.  Can you be more specific on the exact problem?

hroderick-thr
11 - Bolide

Your expected results isn't clear. 

I suggest for debugging change it to ELSE [DivCd] so you can see what is in there.

 

Is [DivCd] a string format coming in? If not you may need to wrap it in ToString([DivCd])

 

Happy solving

RPS
7 - Meteor

Or simply replace "blank" with " "

AmritJ
5 - Atom

Hi All,

 

Thanks for your inputs.

Turns out I had to convert the data type of my DivCd was V_WString. So I had to change it to Int32 so that it latches onto the numbers 10,20 ,etc and not any extra blank spaces within the cell!

AmritJ
5 - Atom

Thanks Alex,

 

The data type needed to be Int in my case and not a string as my input data may be having extra spaces within the cell that I am looking for!

Labels