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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Robert14358
Resolver III
Resolver III

How to sort columns in a matrix by measure value?

If you have 17 columns in matrix with 1 measure, how do you sort left to right based on measure value?

1 ACCEPTED SOLUTION

Hi @Robert14358 
The matrix doesn't have x/y axes, if we are talking about sorting columns as I mentioned in my previous response it is possible only with the matrix from the market place.
You can right-click on the "Grand total" Cell:

 

Ritaf1983_0-1725680999095.png

Choose the option to sort "your columns" by this row:

Ritaf1983_1-1725681103690.png

Result :

Ritaf1983_2-1725681150743.png

The pbix is already attached to the previous response.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

8 REPLIES 8
Robert14358
Resolver III
Resolver III

there is currently a suggested idea that is open for this for over 4 years, can all of you who saw this request please go and vote for it?

Microsoft Idea

 

this is a basic excel function and needs to be in power bi.

Robert14358
Resolver III
Resolver III

no i need this in a maxtrix, pretend its a sum of sales where the row is product and the column is country, i need to sort the columns based on sales by country

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Ritaf1983
Super User
Super User

Hi @Robert14358 

If the sorting must be dynamic I am afraid that we don't have this functionality with the core matrix visual.
There is an idea about the issue you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=905c11cc-3315-ec11-b76a-281878bd1a87

There is a free matrix from the marketplace that can sort the columns too :

Ritaf1983_0-1725645751488.pngRitaf1983_1-1725645789004.png

I attached the pbix for my response to follow

+ inforiver visuals have this functionality too , but for pay 

 

P.S

If for a moment we disconnect from the technical aspect, it’s also important to note that ranking from large to small shouldn’t be horizontal, but vertical. In other words, the metrics should be in 'rows.'

Ritaf1983_2-1725646284011.png


The horizontal axis is a logical axis (like in distribution graphs), and its logic is consistent — a timeline moves from old to new, a range axis moves from small to large.

When we change these concepts, we make it harder to read the visualization. Therefore, regardless of the tool's technical limitations, I strongly recommend that the 17 categories you're comparing be arranged vertically, and whatever you are comparing them against (if it's some logical axis) should be arranged horizontally.

And if it's just hierarchical groups (lists within lists), it’s better to create a hierarchical matrix without column divisions:

Ritaf1983_3-1725646447122.png

 

 

 

 

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

how do u sort the X axis values from greatest to least? based on grand total

Hi @Robert14358 
The matrix doesn't have x/y axes, if we are talking about sorting columns as I mentioned in my previous response it is possible only with the matrix from the market place.
You can right-click on the "Grand total" Cell:

 

Ritaf1983_0-1725680999095.png

Choose the option to sort "your columns" by this row:

Ritaf1983_1-1725681103690.png

Result :

Ritaf1983_2-1725681150743.png

The pbix is already attached to the previous response.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Are you looking for a histogram chart?

lbendlin
Super User
Super User

Is it a single row?  how should it be sorted if you have multiple rows?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.