Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sorting column in the order I want

Taki
8 - Asteroid

Hi:

 

I need to sort columns by giving it a sort order but I am not able to figure it out. For example: I have month as my column like Jan, Feb and Mar but currently, the output is not giving to me in that order. I would like to assign if it is Jan, then order number of 1 and if it is Feb then an order number of 2 and March the order number of 3 and so forth and then sort the column in that order for output to Excel. This is because I don't know what months will be available (month will be added as time goes on). Appreciate any help provided.

 

Thank You.

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hi @Taki ,

 

A suggestion is for you to have an additional table with all the numbers for the months but you can also can get the month number by using the function datetimeformat.

fmvizcaino_0-1593115313705.png

 

 

Examples attached.

Best,

Fernando Vizcaino

echuong1
Alteryx Alumni (Retired)

I believe you're looking to reorder the actual columns, correct? If so, the attached should work for you. It essentially pivots the data so the field names are actual data pieces. From there, you can assign the order and then sort based on assigned order. After that, you can pivot the data back.

 

echuong1_0-1593176972888.png

 

Let me know if this works for you!

 

Taki
8 - Asteroid

Thank You.

Labels