Forum Discussion
ShrimpSurf
Helper II
4 years agoHow to Reverse Sort of Column Headers
How do you reverse the sort of column headers? In my example the sort is from 2018 to 2022. I would to go from most recent year to oldest. Help please!
- Anonymous4 years ago
Hi ShrimpSurf
You can create a conditional column to add a reverse index .
(1)Add a conditional column in Power Query .Set year 2022=1,2021=2…
(2)Go back to Desktop view, and choose the column [year] ,sort by the conditional column .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
aj1973
Community Champion
4 years agoHi ShrimpSurf
In the table where field date/year is, add a column where you rank the years descending, like 2022 equals 1, 2021 equals 2 , 2020 equals 3.... Once the column is added go back to the field in the report and sort it by
the name of the new added column.