community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

IF AND Statement

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!
Alteryx Certified Partner

Hey @kschulke 

 

What error do you get?

 

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

Alteryx Certified Partner
Alteryx Certified Partner

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,

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?
Atom
Thanks so much! Works perfect!
Magnetar
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