We’ve extended Inspire Early Bird Pricing until March 1. Register now and enjoy 20% off conference passes and 10% off training passes. P.S. Don’t forget to bring friends! When you sign up for five or more tickets, you get an extra 20% discount on conference passes. Learn more now.
alteryx Community

# Alteryx Designer Desktop Discussions

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

## Nested If Statments

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

3 REPLIES 3
20 - Arcturus

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

Hi @zoeuno

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

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