Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Anything over 1000000 gets an incorrect code

tpostlewate
7 - Meteor

Morning work family!
I am working on a formula and running into a problem. I am trying to code houses over $500000 with a 2 in a new column, and under with a 1 (unknowns with 0). It works fine until I run into a house over $1000000, in which it gives it a code of 1 instead of 2. I am assuming I need to do something that pushes everything to the right to analyze it, but 1)I'm not sure and 2)I don't know how to do that.  Here is what I have:

IF IsEmpty([Estimated Current Home Value]) THEN "0" ELSEIF [Estimated Current Home Value] > "500000" THEN "2" ELSE "1" ENDIF

Any ideas on how I can get this fixed?

 

Thanks, 
Terri

3 REPLIES 3
FlorianC
Alteryx
Alteryx

Hi @tpostlewate,

 

The formula you shared is comparing the text value of the field [Estimated Current Home Value] to the text value "500000".

 

In order to properly check for the amount value, convert the field [Estimated Current Home Value] to an integer or double and remove the quotes in your formula to compare numbers together.

Florian Carrier
Strategic Solution Consultant
Alteryx
RolandSchubert
16 - Nebula
16 - Nebula

Hi @tpostlewate ,

 

you could convert to value in the column to number to ensure, that the numeric value is used in the condition and not the string value. Give this condition a try:

 

IF IsEmpty([Estimated Current Home Value]) THEN
"0"
ELSEIF ToNumber([Estimated Current Home Value]) > 500000 THEN

"2"
ELSE
"1"
ENDIF

 

Let me know if it works for you.

 

Best,

 

Roland

tpostlewate
7 - Meteor

Thank you! That worked perfectly.

Labels
Top Solution Authors