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!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

LONG Nested IF statement

mingy22
5 - Atom

Hi Community,

 

I am trying to use this nested IF statement:

 

IF [Month] = "1" THEN "January"
ELSEIF [Month] = "2" THEN [F7] ="February"
ElSEIF [Month] = "3" THEN [F7] = "March"
ElSEIF [Month] = "4" THEN [F7] = "April"
ElSEIF [Month] = "5" THEN [F7] = "May"
ElSEIF [Month] = "6" THEN [F7] = "June"
ElSEIF [Month] = "7" THEN [F7] = "July"
ElSEIF [Month] = "8" THEN [F7] = "August"
ElSEIF [Month] = "9" THEN [F7] = "September"
ElSEIF [Month] = "10" THEN [F7] = "October"
ElSEIF [Month] = "11" THEN [F7] = "November"
ELSEIF [Month] = "12" THEN [F7] = "December"

ELSE [Month] ="n/a"

ENDIF

 

within the Formula tool to create a new column taking the month # value from another column and changing it to written month. But I am getting an error that my IF statement is incorrect and I have tried everything. Thanks for your help!

3 REPLIES 3
ivoller
12 - Quasar

If you are trying to set [F7] based on this formula you should use something like

 

IF [Month] = "1" THEN "January"
ELSEIF [Month] = "2" THEN "February"
ElSEIF [Month] = "3" THEN  "March"
ElSEIF [Month] = "4" THEN  "April"
ElSEIF [Month] = "5" THEN  "May"
ElSEIF [Month] = "6" THEN  "June"
ElSEIF [Month] = "7" THEN  "July"
ElSEIF [Month] = "8" THEN  "August"
ElSEIF [Month] = "9" THEN  "September"
ElSEIF [Month] = "10" THEN  "October"
ElSEIF [Month] = "11" THEN  "November"
ELSEIF [Month] = "12" THEN  "December"

ELSE [Month] ="n/a"

ENDIF

 

 

Also check out SWITCH statement for another way.

DiganP
Alteryx Alumni (Retired)

@mingy22 make sure your formula is set up correctly.

Capture.PNG

 

 

 

 

 

 

 

 

 

 

You do not need [F7] = in all the statements. Just put the Output column as F7. Hope that helps.

Digan
Alteryx
mingy22
5 - Atom

Thank you so much!

Labels
Top Solution Authors