Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

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