Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
Solved! Go to Solution.
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
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
Hi @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.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
@ShrimpSurf @bcdobbs I don't believe Power BI will let you sort the column headers in descending order if there are also row fields added to the matrix. I think a technique like the one described below is required for this:
https://www.biinsight.com/quick-tips-how-to-sort-matrix-by-column-in-descending-order/
Thanks @ebeery, that'll teach me to reply from memory! Had to boot laptop up to check but yes 100% correct you do have to trick it with a sort order column.
Have a great new year.
Haha @bcdobbs definitely seems like one of those things that should be possible, but still has to be "hacked" ☹️.
Thanks, you too!
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |