Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Help with IF formula

rdeshpande
7 - Meteor

Hello, could you please help me understand what is wrong here? Thank you in advance

 

rdeshpande_0-1632686112891.png

 

 

IF [Brand] = "A01" AND [Material] IN ("SGE68X55UC","SGE78B55UC","SGV68U53UC","SGV78B53UC","SGX68U55UC","SGX78B55UC","SGE53B52UC","SGE53B55UC","SGE53B56UC","SGE53X52UC","SGE53X55UC","
SGE53X56UC")
THEN "xxx"
ELSE "yyy"
ENDIF

3 REPLIES 3
KarolinaRoza
11 - Bolide

hi @rdeshpande 

 

I think it is due to NUMERIC data type of column Band, and you try to compare it with string value.

 

Your formula will work if you apply tostring() function:

 

IF tostring([Brand]) = "A01" AND [Material] IN ("SGE68X55UC","SGE78B55UC","SGV68U53UC","SGV78B53UC","SGX68U55UC","SGX78B55UC","SGE53B52UC","SGE53B55UC","SGE53B56UC","SGE53X52UC","SGE53X55UC","
SGE53X56UC")
THEN "xxx"
ELSE "yyy"
ENDIF

 

 

 

Regards,

Karolina

Emil_Kos
17 - Castor
17 - Castor

Hi @rdeshpande,

 

@KarolinaRoza is right. I am assuming that you don't have A01 in values for Brand column. I would suggest changing this to string(using the select tool) if you expect to have a string value in there. 

rdeshpande
7 - Meteor

Spot on... thanks a million for a very quick reply

Labels
Top Solution Authors