Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Nested If Then Else Statement

msawyer
5 - Atom

Is it possible to create an If Then Else statement that allows for more than three conditions?  For example, I need to create an If Then Else statement that looks at a number and determines if it falls in the following buckets; late, on-time, within 30 days, between 31 and 60 days, between 61 and 90 days, and greater than 90 days.

 

Thanks!!

13 REPLIES 13
vmanika8
7 - Meteor

Thanks a lot Thomas... It works for me. But what about if the Days open field has blank cell.

I need to get the result field as "closed" for the blank cell items. How to do that?

 

Eg:

Days open     Result

30                   30-40

                       Closed

60                   60-90

thomas_vdb
7 - Meteor

This is a clause like another:

 

IF [Days Open] >= 30 THEN "30-40"
Elseif [Days Open] > 60 THEN "60-90"
Elseif IsEmpty([Days Open]) THEN "Closed"
ELSE [Days Open] ENDIF

 

😉

amigdal
5 - Atom

Hello, 

 

I need some help. I am trying to transfer the following excel functions into Alteryx and am having trouble. Can someone please help me?

Excel function #1: if([Column 1] <>"Personal", if([Column2]>1,if([Column3]<=1500000,"Y","N"), if([Column4]<=1500000,"Y","N")),"N")

Excel Function #2: if([Column 1] <>"Personal", if([Column2]="Y","Zebra","Lion"),"Hippo")

Excel Function #3: if([Column1]="Whale","Orca",if(Column2]="1","Sealion",if([Column3]<>0,"Fish",if(AND(OR([Column4]="Penguin",[Column4]="Swan"),[Column5]="Sparrow"),"Bird",if(AND(OR([Column4]="Penguin",[Column4]="Swan"),OR(Column5]="Sparrow",[Column5]="Duck")),"Animal with Feathers",if(AND(Column4]="Pig",[Column1]="Lion",[Column6]>250000,"Mammal","Not Mammal"))))))

 

Thanks,

 

Andrew

JohnJPS
15 - Aurora

@amigdal 

You might be able to replace the "if" with "iif" and otherwise use the same expression.

Hope that helps!

John

Labels