Alteryx Designer Desktop Discussions

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

IF AND Statement

kschulke
5 - Atom
I'm trying to write and IF and Statement: IIf (Balance 12.31.2018=0 AND Balance 6.30.2018<>0, "New", "No") but it gives me an error. I'm trying to say that as long as my 12/31 balance is 0 and my 6/30 balance is anything other than 0 to return "New". Any help would be greatly appreciated!
5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @kschulke 

 

What error do you get?

 

Your statement looks good but without more information its hard to diagnose

Thableaus
17 - Castor
17 - Castor

Hi @kschulke 

 

I think you're probably getting the operator wrong.

 

 IIf (Balance 12.31.2018=0 AND Balance 6.30.2018!=0, "New", "No") 

Use != instead of <>

 

Also, check for datatypes. 

 

Cheers,

kschulke
5 - Atom
It says "An expression cannot end with an operator" I'm guessing it doesn't like the <> but not sure how to fix it?
kschulke
5 - Atom
Thanks so much! Works perfect!
Claje
14 - Magnetar

I found two issues here:

You need brackets around your field names (since there is a space in them), and Alteryx does not use <> as "Not equals", instead it uses !=

 

IIf ([Balance 12.31.2018]=0 AND [Balance 6.30.2018]!=0, "New", "No")

Labels