Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
2 years ago
Solved

SORT FOR A YEAR

Hi how are you, I want to sort my data by YEAR but I haven't managed to do it, I'm loading the data into an array and this is the detail of the array And so it shows me the data in the matri...
  • Syndicate_Admin's avatar
    2 years ago

    Thank you for your reply, I had already made a code which worked for me, I took it from another solution and used it as an example.

    Create another table

    YearOrder = DATATABLE("Year",INTEGER,"YearDesc",INTEGER,{{2021,2024},{2022,2023},{2023,2022},{2024,2021 }})
    I related it to the base table where the year is, then in the matrix I showed the Year value of the new table, that way I sort the data by year.

    Thank you very much and I leave the link from which I took the example, it was for months but the truth is that it also helped me to adjust it to the YEAR.

    https://community.fabric.microsoft.com/t5/Translated-Spanish-Desktop/Ordenar-por-a%C3%B1o-y-mes-una-matriz/m-p/3011783#M528499