Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matrix Chart show oldest to newest dates and I need newest to oldest

I can't seem to find out how to sort the Matrix chart so it shows the most recent date first. I don't want to have to scroll to the end of the chart to see the most recent data. Can this be done? We have a few dashboards like this. 

 

2020-05-13_16-17-35.jpg

8 REPLIES 8
Watsky
Solution Sage
Solution Sage

If what @mahoneypat  suggested doesn't work for you then try this.

 

In Power Query:

 

Go to the table that has the dates make sure the table is sorted in ascending order.  Add this code changing #"INSERT LAST APPLIED STEP HERE" to the last applied step you have on your query settings. 

 

 

= Table.AddIndexColumn(#"INSERT LAST APPLIED STEP HERE", "Inverted Index", Table.RowCount(#"INSERT LAST APPLIED STEP HERE"), -1)

 

 

For instance if your last step was Inserted Year then it would read:

 

 

= Table.AddIndexColumn(#"Inserted Year", "Inverted Index", Table.RowCount(#"Inserted Year"), -1)

 

 

If there is only Source in your applied steps then it would be:

 

 

= Table.AddIndexColumn(#"INSERT LAST APPLIED STEP HERE", Source, Table.RowCount(Source), -1)

 

 

Now you should have an index column that is inverted. Then close and apply.

 

Now click on the date  field in the fields section so it's highlighted.

 

Go to Column tools, click Sort by Column and click on the Inverted Index field.  That should give it to you in the order you're looking for.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

mahoneypat
Microsoft Employee
Microsoft Employee

Have you tried clicking on the ellipsis in upper right of matrix, choosing Sort By (your date column) and choose descending?

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

The sort by only has the Company Name, Meter Name, Scheduled Qty. The dates are not an option, and the date field is the only field in the Columns fields.   

Not sure if that response is towards my post or not, but if you have the date field highlighted you would want to select the Inverted Index on it.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Anonymous
Not applicable

Sorry that was for mahoney.pat solution. I'll attempt your solution this afternoon. I'm not great at Dax so I may fumble with the solution. I am still learning and tend to lean on our IT department as well. 

Give it a shot. Let me know if it works or if you have problems.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Anonymous
Not applicable

I am failing at that solution you provided. I am wondering why it's not an easy solution to just select ascending or descending order in the chart...Why do I need to jump through hoops to filter a chart? 

The issue is that you're not seeing your date fields in the sorting options so we need to find another way to sort. What part of the solution are you having problems with?


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors