Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse Error

kluther2
5 - Atom

Hi! I'm trying to create a formula for Z-score classification.

 

When I enter in:

If [Z-score]<=1.8 Then "Unhealthy" Elseif [Z-score]>=3 Then "Healthy" Else "Unclassified" Endif

 

I get a parse error at char (52): invalid type in operator >=. (Expression 1)

 

Does anyone know how to fix this?

 

Thanks!

2 REPLIES 2
alexnajm
18 - Pollux
18 - Pollux

Looks like z score is being stored as a string - change it to a numeric data type before this formula!

flying008
15 - Aurora

Hi, @kluther2 

 

In new field, the formula is :

 

IF ToNumber([Z-score]) <=1.8 THEN 'Unhealthy' 
ELSEIF ToNumber([Z-score]) >=3 THEN 'Healthy' 
ELSE 'Unclassified' ENDIF
Labels
Top Solution Authors