cancel
Showing results for
Did you mean:

# Alteryx designer Discussions

SOLVED

## Nested If Statments

Highlighted
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 Receipts LLC Fee <250,000 - <499,999 900 <999,999 2,500 <4,999,999 6,000 >5,000,000 11,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

```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.

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