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!
Start Free Trial

Alteryx Designer Desktop Discussions

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

conditional failing

AZAD
7 - Meteor

HI there, 

 

Not sure what is wrong with my conditions statement(?)

IF 0.97 <= [AVG] >= 1.03
THEN 0
ELSE 1
ENDIF

 

while running the workflow I am getting the following error (see attached PNG file). Can someone please quickly take a look?  

 

Thanks, 

Azad

7 REPLIES 7
patrick_digan
17 - Castor
17 - Castor

@AZAD try this:

IF 0.97 <= [AVG]  AND [AVG] >= 1.03
THEN 0
ELSE 1
ENDIF
AZAD
7 - Meteor

Same error. 

AZAD
7 - Meteor

Same error. 

patrick_digan
17 - Castor
17 - Castor

@AZAD Is AVG perhaps a string? You can check by clicking on the line entering the formula tool. I would use a tonumber function to convert it:

IF 0.97 <= tonumber([AVG])  AND tonumber([AVG]) >= 1.03
THEN 0
ELSE 1
ENDIF

You'll also want to change this calculated field to a numeric type (like int16 or double).

AZAD
7 - Meteor

Oh yeah. I totally missed to checkout the datatype. 

 

Thanks, Patrick. Appreciate it. 

AZAD
7 - Meteor

So I fed that data into my Logistic model and got the error (see attached pic). Can you please let me know what this error is about? 

 

Thanks

patrick_digan
17 - Castor
17 - Castor

@AZAD I'm not as familiar with the logistic tool in Alteryx. I would start a new thread.

Labels
Top Solution Authors