alteryx Community

# Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!

## if else if Formula implication

8 - Asteroid

Hi experts,

I'm confused in a formula implication in Alteryx. There is if else if condition  and I'm confused to implement it.

=IF([[Check C.5.b]]<>"Yes","NA",
IF([[Solution ID?]]="Yes",IF(AND([@[No. of days between RN & ARN]]>=-30,[@[No. of days between RN & ARN]]<=30),"Result C.6.a","Result C.6.b"),"To be reviewed"))

3 REPLIES 3
Alteryx

Hi @AS ,

I think there are two formulas, In Alteryx the sintax would be:

For your convenience here are the references for the formulas, in particular for conditionals:

https://help.alteryx.com/20213/designer/conditional-functions

Gabriel

11 - Bolide

@AS
I'm a big fan of the IIF construct.

``IIF(bool, x, y): Returns x if bool is true, else returns y.``

I'll nest them like they were Matryoshka dolls:
iif(condition_1, 'one',

iif(condition_2, 'two',

iif(cond_3, 'three', 'no more, I cannot count any higher')))

12 - Quasar

I'm not sure about nesting them but I agree with @David-Carnes on using the IIF formula for simple conditional statements. If you are used to writing IF statements in Excel, the IIF formula is the same syntax except for the extra I in IIF