Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have not found an answer to this specific question, so will post here and hope its a quick fix! Thank you in advance.
I am creating a Power Bi report, and I am using a matrix visual to slice my data.
I am unable to sort my matrix visual by 'Year' Descending which is inputted into the Columns field. As shown in the image below:
Therefor the visual looks like this:
I'd like it so that the most recent year shows first! Like this:
Here are the solutions that I have tried (but have had no success):
1) Sorting the inputted data in Power Query by descending!
2) Adding an additional column in power query, which I use to sort the 'Year' column descending.
Solved! Go to Solution.
It seems you can not order by a date hierarchy! You would have to create a new column that extracts the year from the date hierarchy and sort by this column in descending order!
It seems you can not order by a date hierarchy! You would have to create a new column that extracts the year from the date hierarchy and sort by this column in descending order!
Hi @ShivGC,
The power query option seems to be working for me.
Did I answer your question? Mark my post as a solution!
This does not work for me. I have tried and tried again!
You may need to add a "Year Offset" column in your data that will show how far off the current date your year is. For example the previous year is -1, current year is 0, and next year is 1. I use this date table in most of my reports and it has this column:
https://radacad.com/all-in-one-script-to-create-calendar-table-or-date-dimension-using-dax-in-power-...
As for the actual solution... I just created a new column and multiplied the aforementioned column by negative one to flip the order
Then you can sort the year column by this new calculated column.
And your years should be in reverse order!
where did you create the offset? This seems to be the solution of sorting by a different column.
Create a date table for your data model. There's a script and video in the link I posted on how to do it and why it's helpful.