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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
TomBI
Frequent Visitor

Sort Matrix first on category name, second on highest value

Hi, 

 

I have created a Matrix with 

- one value, the Qty 

- two row dimensions, the category and the item id

 

There are three categories, A (most important), B (second most important) and C (other). There are multiple item id's within those categories. 

 

I want my matrix to be sorted on two levels:

- First on category level (I use an index column to sort accordingly)

- Second on the items id's with the highest value within that category

 

The problem is that when I rank on highest value, the "Other" category shows up first, because it has the higest total value. But if I rank on the Category, the items within that category also rank alphabetically. 

 

matrix.png

 

Is there any solution this problem? It may involve DAX.  

 

Thanks! 

3 REPLIES 3
Anonymous
Not applicable

Hi @TomBI ,

 

Please try the solution in this post:

https://community.powerbi.com/t5/Desktop/Matrix-multiple-Sort-columns/m-p/523938 

 

Best Regards,

Jay

TomBI
Frequent Visitor

Thanks @amitchandak 

amitchandak
Super User
Super User

@TomBI , In Matrix, You can not sort on more than one column. Only in table, you can do that

 

You can vote for an idea - https://ideas.powerbi.com/ideas/

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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