Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

IIF Function with Multiple Contains

yzhang316
8 - Asteroid

Hi,

 

I am trying to convert an SQL script into the Formula button, but can't seem to work. 

 

IIF ([Order Number] IN ('111','222','333'), "Parts","Non-parts".  For some reason it is not working.

 

Please advise.

Wayne

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @yzhang316 

 

You have a missing parenthesis in your formula:

IIF ([Order Number] IN ('111','222','333'), "Parts","Non-parts")

 

Also, is Order Number an Int Type or String Type?

 

If it is an Int, the formula should look like this: IIF ([Order Number] IN (111,222,333), "Parts","Non-parts")

 

You shouldn't quote what's inside if it's a number.

 

Cheers,

yzhang316
8 - Asteroid

Thank you!

Labels