Alteryx Designer Desktop Discussions

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

IF Function

mihir_mir_jb
8 - Asteroid

Hi All,

 

Greetings for the day.

 

I have used IF function as below..

IF [Per Person Expense] <='25' THEN 'Yes' ELSE 'No' ENDIF

 

However in the output I am getting result as No for an expense which is less than 25. Ideally this should be Yes as per the formula.

 

Attached is an example.

Please help.

 

Thank you. 

 

6 REPLIES 6
DavidP
17 - Castor
17 - Castor

I'm guessing that the data type for [Per Person Expense] is a string, which means that <> would work like a dictionary sort. 

 

Try tonumber([Per person Expense]) <= 25

mihir_mir_jb
8 - Asteroid

Thank you David for your reply.

 

When I prefix Tonumber it gives me error - Invalid type in operator <=.

 

 

sean_bolte_dup_544
8 - Asteroid

This is your setup

 

SetupView.PNG

DavidP
17 - Castor
17 - Castor

you have to remove the quotes around 25, as @sean_bolte_dup_544 showed

mihir_mir_jb
8 - Asteroid

Thank you very much @sean_bolte

mihir_mir_jb
8 - Asteroid

Thankyou @DavidP

Labels