ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
The Alteryx Community has implemented a new single sign-on experience. If you are having issues with your account, please review the FAQ's.

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Conditional Statements: Using IIF instead of IF THEN


One trick I often use to conditionally update a field is the Boolean IIF function.  IIF is basically a shorthand version of a single condition test.  While the documentation suggests that you’d be performing the function against a Boolean field, you can also create the Boolean test within the expression.


For example, you’d like to populate a string type designator field based on numeric data like sales – Stores with sales numbers below $1,000,000 are high risk stores.  A simple IF/THEN is a typical way to do this, but the Boolean IIF function can do the same thing and it’s much quicker to write out!  See below and the attached v11.0 workflow example.


IF [Sales]<1000000 THEN "High" ELSE "Low" ENDIF




IIF([Sales]<1000000, "High", "Low")


Jerad Rades

Customer Support Engineer