We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Reading Negative value in if statement

Yesha
6 - Meteoroid

Hi,

 

I have fixed decimal negative value in my data and when I parse that value in my if condition it doesnt read my negative values.

 

eg:

if I have -7 then I should get 0 but I get 1

 

IF [Balance] >= 10000000 THEN 10
ELSEIF [Balance] >= 5000000 THEN 7
ELSEIF [Balance] >= 1000000 THEN 5
ELSEIF [Balance] >= 500000 THEN 4
ELSEIF [Balance] >= 250000 THEN 3
ELSEIF [Balance] >= 100000 THEN 2
ELSEIF ([Balance] >= 1 and [CADBalance] <= 25) OR ([Balance] >= -1 and [Balance] <= -25) THEN 0  ------ Based on this condition
ELSE 1
ENDIF

 

can someone please advise.

Thank you!!

1 REPLY 1
ggruccio
ACE Emeritus
ACE Emeritus

Hi @Yesha,

 

Should your statement actually read:

 

ELSEIF ([Balance] >= 1 and [CADBalance] <= 25) OR ([Balance] <= -1 and [Balance] >= -25) THEN 0

Labels
Top Solution Authors