Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Nested If Statments

zoeuno
7 - Meteor

I'm trying to use the Formula Tool to do a nested If statement so I can input from the left column and get the output like the right one (see below).

Gross ReceiptsLLC Fee
                              <250,000        -  
                      
                     <499,999900
                      
                     <999,9992,500
                   
                  <4,999,999 6,000
                  >5,000,00011,790

 

The if statement I wrote is "IF [Cash Rent] > 5000000 THEN 11790 ELSE if [Cash Rent] > 1000000 THEN 6000 ELSE IF [Cash Rent] >500000 THEN 2500 ELSE IF [Cash Rent] > 250000 THEN 900 ELSE 0 ENDIF" but Alteryx is giving me a "Malformed If Statement". 

 

Can someone tell me what's wrong? Thank you!!

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@zoeuno,

 

IF
[Cash Rent]  >= 5000000 THEN 1170 ELSEIF
[Cash Rent]  >=  999999 THEN 6000 ELSEIF
[Cash Rent]  >=   49999 THEN 2500 ELSEIF
[Cash Rent]  >=  250000 THEN  900  ELSE
0
ENDIF

That should help...

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
DataBlender
11 - Bolide

Hi @zoeuno 

 

Close! The "Else If" needs to be "ELSEIF" (case doesn't matter) instead.

 

 

 

varunkiran
5 - Atom

Hi @zoeuno,

 

can you help on the below for Nested If Statment.

 

if Ums_b_J <=&jahr.-1   then Bemerkung='geschlossen               ';

 

if Ums_b_J =&jahr. and Ums_b_M <= &monat.-1    then Bemerkung='geschlossen               ';

if Ums_b_J =&jahr. and Ums_b_M = &monat. and Ums_b_T <= &sonntag.   then Bemerkung='geschlossen               ';  

if Ums_b_J =&jahr. and Ums_b_M = &monat. and Ums_b_T > &sonntag.  then Bemerkung='geplante Schließung       ';  

if Ums_b_J =&jahr. and Ums_b_M >= &monat.+1  then Bemerkung='geplante Schließung       ';

 

if Ums_b_J =&jahr.+1 and Ums_b_M <= 12 and Ums_b_T <= 31    then Bemerkung='geplante Schließung

Labels