Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Not considering entire condition

Abhishekjoshua
7 - Meteor

When I click on RUN, it is just considering the 1st line of condition which is of "30" and ignoring the rest. I'm clueless as I'm new to Alteryx

 

Can someone help me here?

 

IF [Days Pending for - PT]>30 THEN ">30 Days"
ELSEIF [Days Pending for - PT]>19 THEN "20-30 Days"
ELSEIF [Days Pending for - PT]>9 THEN "10-20 Days"
ELSEIF [Days Pending for - PT]>5 THEN "6-10 Days"
ELSEIF [Days Pending for - PT]<6 THEN "0-5 Days"
ELSE "NA"
ENDIF

2 REPLIES 2
Luke_C
17 - Castor

Hi @Abhishekjoshua 

 

Can you share some data? It seems to work fine for me:

Luke_C_0-1658325404512.png

 

 

IraWatt
17 - Castor
17 - Castor

Hey @Abhishekjoshua,

If statements apply the logic in the order you right them AKA they apply the first rule which works. I would write that statement like this:

 

 

IF [Days Pending for - PT]<6 THEN "0-5 Days"
ELSEIF [Days Pending for - PT]<11 THEN "6-10 Days"
ELSEIF [Days Pending for - PT]<21 THEN "10-20 Days"
ELSEIF [Days Pending for - PT]<31 THEN "20-30 Days"
ELSEIF [Days Pending for - PT]>30 THEN ">30 Days"
ELSE "NA"
ENDIF

 

 

IraWatt_0-1658325490658.png

The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20... 

 

Any questions or issues please ask :)
HTH!
Ira

Labels