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
Anonymous
Not applicable

Sorting in matrix visual

I have a matrix visual, and want to sort it by quantity and total sales,

when click on ellipses and then click on sort by, there is two options - quantity and total sales

 

And when I select one of them it will sort the matrix but not correctly.

Sorting is wrong, why is this happening?

 

And one thing I have row colums as date and want to sort the date as well in descending order means get the latest date by first and so on, now it's showing latest date in last

 

These are the two question I have, please it's urgent help me

 

I am attaching the scs-

Capture.PNG

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Sorting-Matrix-by-Value-and-Keeping-Hierarchy-Label/m-p/849267#M407569

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

View solution in original post

9 REPLIES 9
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Sorting-Matrix-by-Value-and-Keeping-Hierarchy-Label/m-p/849267#M407569

Community Support Team _ Sam Zha
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

@Anonymous , can you share screen shot

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
Anonymous
Not applicable

@amitchandak 

Hi
As you can see, I sorted this matrix by total sales but it's not working properly

And second

My date column - I want to sort it by latest date at first and then following

 

Could you help me out here?

@Anonymous , When you use Column in the matrix the sorting will happen on column Grand total. So Check the last column of grand total and see if it correct or not.

For Date desc sort. Refer to the attached file. I create a new date and Desc Date Rank from the date column and sorted this new column on desc rank and use that in 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
Anonymous
Not applicable

@amitchandak 

I see your pbix file, you have non-repeating dates, that's why you create a Date rank and sort it by.

 

But my data has repeatative date, so I am unable to use that.

 

I am attaching a screenshot of my data of date column

 

Capture.PNG

@Anonymous , Are you not using the date table. I have nonrepeating date in date table

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
Anonymous
Not applicable

@amitchandak 

I have a table in which there is date column which contains reparative dates.

 

So, what will be the solution for this

I attached the screenshot for the same before

 

Anonymous
Not applicable

@amitchandak 

Thank you for your response.

But still sorting is not working, as you said to check the last column of grand total, it's still showing wrong order of sorting.

 

Can you see through this again, I am attachingCapture.PNG

 

the updated screenshot for your reference.

 

THanks

Anonymous
Not applicable

Capture.PNG

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.

Top Solution Authors