In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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