Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago

Sort an array by year and month

Good everyone.

I have a table, which has no date, but a month column and a year column, plus other columns of calculation of values:

To which I made an "unpivot" to display the data so that the column names remain as rows for what I need (the capture does not show all the total records, but the idea is understood):

All this to be able to show the following form in a matrix:

So far so good, but my problem comes at the time of ordering, since I need to show the columns by descending year and descending month:

2023 - 2022
1 - 12 - 11 - 10 - 09 - 08 - 07 - 06.... etc

Try creating a separate table with the months in number and the name of the month, but it does not work and it does not help me to create a calendatio table and establish an order there, because as you can see, it only has fields month and year.

I hope you can guide me.

5 Replies