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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to sort a matrix based on the column of your choice OR based on an external value?

Hi, fellow Power BI geeks!

 

I'm having trouble with sorting a matrix I am building.

 

I've made a matrix which is linked to a slicer in my page: you can select in the slicer which columns are shown in the matrix.

It's pretty cool and works (not styled yet please don't judge by the looks =p ).

The problem is that the matrix is always sorted by the column that's all the way to the right.

The matrix is sorted by the last column on the rightThe matrix is sorted by the last column on the right

 

Does someone know how to sort a matrix by a value of your choice?
Either by a specific column or a field that is not present in the matrix?

 

Thanks in advance!

Camille

8 REPLIES 8
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

To my knowledge, matrix visual could only sort by total value for a measure. It couldn't sort by a custom sub-column for now.

 

Regards,

Lin

Community Support Team _ Lin
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 , In Matrix as of now you can sort the columns on Row Grand totals if you use columns. That you can change using three dots.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak  Yes, this I know 😃 But grand totals are not useful in this case because each column contains a different information which does not make sense summed up with the others. I wanted to give my users the possibility to sort the matrix by whichever column they want (just like they can in a regular table).

@Anonymous , If you are looking for what is given in this Idea.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/32236672-sort-by-individual-column-values-in-a-matrix

 

Vote for that.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@aj1973 Yes, I already know. But in my matrix the columns are determined by a column in my model. All the values then result from a single measure. Which means I cannot use the "Sort by" option in "..."
@amitchandak Thanks! I'm having trouble voting though... It's requiring a captcha which is not displayed...  EDIT: Nevermind, it's displayed now. I voted!

aj1973
Community Champion
Community Champion

Here is an Example

Sort measure.PNG

Water Target is a measure

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

aj1973
Community Champion
Community Champion

Hi @Anonymous 

You might need to sort all you column and measures in your Tables before using them into your Matrix.

 

Enjoy My Report on Covid-19

https://app.powerbi.com/view?r=eyJrIjoiMjc2N2ZkZmYtMTNjYi00N2Q0LWE4MmUtYjhiY2E4NTQxZGM1IiwidCI6IjgzNTU5ODFiLTJlYTYtNDdjZi04ZjJiLTc3MTY3N2FmZjMyZCJ9

 

Regards

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973  Thank you for your reply. I know how to sort a column but how do I sort a measure? 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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