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

Sort multi columns in Matrix table

Hi All,

 

Does anyone know if it's possible to sort multi columns in Matrix table?

 

Regards

BK

11 REPLIES 11
powerbi_user191
Advocate I
Advocate I

In case this help, here's a workaround in case sorting by the right-most column will also correctly sort the rest of the columns (for instance, sorting by Date will also sort Month, Quarted, Year):

Set Visual/layout and style presets/Layout to Compact.
Sort by the only column that's now available for sorting. Apparently, this will actually sort by the right-most column.
Switch Visual/layout and style presets/Layout back to your preferred layout.

Vanda
New Member

1. I have created a display order column. I already had an order column for both columns each, so I only needed to concatenate them. (In principle, I had to convert text to values, revert orders, insert 0s)

2. Added the display order column to the table, removed text wrap, and reduced the width so it is not visible. Make sure you position the column correctly within the matrix (first column willl fragment it)

3. Sorted the matrix based on the hidden column

 

 

Anonymous
Not applicable

If you have the latest version of PowerBI desktop you can do this in 4 following steps:

Step 1: Convert the matrix into a table

Step 2: Sort the table by "First" column (Click again if you want to change the sorting order in opposite direction)

Step 3: Now add additional sort in the table by using Shift + Lift Click on "Second" column (Shift + Lift Click again to change sort order to opposite direction)

Step 4: Convert the table back to matrix now, and your matrix retain these sort orders now

 

If this helps you then please give a thumbs up to the solution 

Thanks for sharing. However, I failed a step 4. When i convert the flat table back to matrix, the matrix only keep sorting of 2nd column. 

v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

There is no direct way to sort multi columns in matrix. As a workaround, you may refer the following link.

Matrix multiple Sort columns 

 

Best Regards

Allan

 

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

First of all, if the answer on your link is correct, then why not just copy and paste it here? Why make us have to click over to find the answer somewhere else? 

 

Second, if the solution you linked to is the real answer (it isn't) than it's an absurd solution to what should be a super simple problem for Microsoft to solve. PowerBi is almost as ridiculous as these community forums.

amitchandak
Super User
Super User

@Anonymous , Refer the multi-sort in March release : https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-march-2020-feature-summary/

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
Greg_Deckler
Community Champion
Community Champion

I think that they just released that for Table visualizations so I would expect Matrix visualizations aren't far behind.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Yeah, it's still not possible in a Matrix, almost 5 (!) years later ... It never stops to amaze me how we just have to wait for such (seemingly) simple things, even in our modern age where IT tech is supposed to develop so quickly.

Another year later and this is still not available! This seems like it would be something easy and simple to add in considering the logic has been built for tables for years. 

@Greg_Deckler 
So optimistic ...

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.