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.
Solved! Go to Solution.
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.
Examples attached.
Best,
Fernando Vizcaino
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.
Let me know if this works for you!
Thank You.