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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HenryJS
Post Prodigy
Post Prodigy

Matrix Sort Date Newest To Oldest

Hi all,

 

Is it possible to sort week ending's in a matrix Newest to Oldest

 

I have tried sorting Week Ending by Week number but it won't let me as there are multiple of the same week number across different years.

 

I need most recent dates / weeks at the start of the matrix.

 

Capture.PNG

 

 

Capture1.PNG

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @HenryJS 

According to your description, first, you want to sort Week Ending by Week number but failed because of different years, I think you can create a calculated column to connect year with week number to distinguish with other years. Like this:

Year-Weeknum = YEAR([Date])&"-"&WEEKNUM([Date],2)

Then you want to make the Matrix sorted by the value of the column(end of the week), but according to my test and research, I guess that Power BI matrix still don’t have this feature, you can click here to vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=1513f45d-a47a-4326-adbe-8bb0023da6c8

Here are some other solutions about this problem, you can take a look and have a try:

https://www.biinsight.com/quick-tips-how-to-sort-matrix-by-column-in-descending-order/

https://community.powerbi.com/t5/Desktop/Sort-by-Column-in-Matrix-Visual-not-by-Row-or-by-Value/td-p...

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column#sort-using-the-sort-...

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@HenryJS , Create columns like these

 

Week ending 1 = [week ending]

week ending rank = rankx(all(Table), [week ending] ,,desc,dense)

 

now mark week ending rank  as sort column of Week ending 1  and use that in visual

sort column - 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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.