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

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

Reply
miketom
Frequent Visitor

Sorting a Matrix

I have been trying to sort my report MATRIX from date ascending (Text field) to date descending for many hours. I have tried the sort column by, but the data is so variable and the way weeks have worked over the years has changed makes that virtually impossible. Help!

4 REPLIES 4
amitchandak
Super User
Super User

@miketom , Check do you have an option in three dots to do this

 

In your date calendar create one more date and create desc rank on the date and mark that date column and use that

Date New = 'Date'[Date]

Date Desc Rank = RANKX(all('Date'),'Date'[Date],,Desc,Dense)

 

Mark the Date Desc Rank  as sort column of Date New and use Date New in your matrix visual

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Apologies, I am lost, are these Measures, Calculated Fields, Other. If I start using DAX it rates them all as 1 due to max, min or average

Anonymous
Not applicable

@miketom 

It was a rough idea to use Rankx, the solution of sorting could be different for cases. It is difficult for us to understand your model just by a few sentences. Can you share a sample pibx which is a straight forward way for us to know your current problem.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My report is a matrix with column headers

 

WE 2020-01-05 WE 2020-01-12 etc ... to Current Weeks

 

I simply want to resort it into reverse order

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.