Start Free Trial

Alteryx Designer Desktop Discussions

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

If and statement issue

JagjeetSingh
5 - Atom

I am trying to use the if and statement and getting error in the formula. can I get help on the following formula. 

IF ([Product_key]=11 AND [reporting_date]=[Ndate] and [Product2]='Retail' AND [WEIGHTED_STG]=1) THEN 'RV1'
ELSE 'test' ENDIF

3 REPLIES 3
IraWatt
17 - Castor
17 - Castor

Hey @JagjeetSingh,

Your IF syntax looks fine. You will be getting this error due to incorrect data types. This is where you for instance you compare a text column to a number column. Can you share some example data?

IraWatt_0-1657186701024.png

Just guessing where the error is but I would check  [reporting_date] and [Ndate] are the same data type.

Any questions or issues please ask :)
HTH!
Ira

 

 

PhilipMannering
16 - Nebula
16 - Nebula

What's the error?

JagjeetSingh
5 - Atom

thanks for your response, I found the issue it is with the data type and I and found a solution for that too.

 

Labels
Top Solution Authors