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

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