Free Trial

Alteryx Designer Desktop Discussions

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

Need Help with IF ELSE statement and how to end

Layla_C
5 - Atom

I am unsure how I am typing this wrong.

 

IF [Aging]<30 THEN 'current'

ELSEIF [Aging]>=30 and [Aging]<60 THEN '30-59 days'

ELSEIF [Aging]>=60 and [Aging]<90 THEN '60-89 days'

ELSE 'over 90 days'

ENDIF

 

As soon as I type ENDIF it turns invalid and says the [Aging]>=60 is “Invalid type in operator >=.” 

Please and thank you!

4 REPLIES 4
CoG
14 - Magnetar

Is [Aging] a numerical type? That is a common error if your field is a string.

 

Your syntax is otherwise fine.

 

Hope this helps and Happy Solving

Layla_C
5 - Atom

Aging is its own output column if that makes sense!

CoG
14 - Magnetar

Yup! [Aging] is set to V_WString. You need to change the data type using the dropdown to an Int.

Layla_C
5 - Atom

Thank you so much!

Labels
Top Solution Authors