community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Nested If Statments

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!!

Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Bolide

Hi @zoeuno 

 

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

 

 

 

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