Dev Space

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

if else if Formula implication

AS
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"))

 

Please help.!

 

 

 

3 REPLIES 3
Garabujo7
Alteryx
Alteryx

Hi @AS ,

 

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

 

Garabujo7_0-1631122629660.png

 

Garabujo7_1-1631122675730.png

 

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

 

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

 

Gabriel

 

 

David-Carnes
12 - Quasar

@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')))

phottovy
13 - Pulsar
13 - Pulsar

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