In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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
Top Solution Authors