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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
yosefzav
New Member

Need Help Sorting a Matrix by a hidden Measure

Hey there, I feel like I'm going crazy trying to figure out this very simple functionality of what I would expect Power BI should be able to handle.

I have a matrix that has a list of names on the Rows, and on the Columns I have a column of Stages, which is 5 categorical values. As the Values I have a Count to give me the number of records in the table to give me the correct numbers. I need the matrix to sort descending by the Stage = "0 - Untouched Draft" to see who has the most in this stage.

 

There is no tooltip that I could add a field that only includes the Untouched Draft stages, so I'm at a loss for what to do. I have not been able to achieve this after working on it all day and have not found a working solution online, is there anyone who can help me out?

 

Screen Shot 2024-01-09 at 4.20.48 PM.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @yosefzav,

Perhaps you can try to create a sorting table to link the current table. Then you can use the new table fields on the matrix column field to apply the custom sorting orders.

Custom Sorting in Power BI  
Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
yosefzav
New Member

Hey @adudani thanks for reaching out. Unfortunately the sort doesn't appear for each of the categories, only for the totals or the list of names in the rows (unless that is a feature that has been added in a newer version of power bi). Also I just tried adding the measure into the rows as the last hierarchy level in the rows, but unfortunately it still doesn't allow me the option to sort by that field, just by the main row and column fields.

Anonymous
Not applicable

Hi @yosefzav,

Perhaps you can try to create a sorting table to link the current table. Then you can use the new table fields on the matrix column field to apply the custom sorting orders.

Custom Sorting in Power BI  
Regards,

Xiaoxin Sheng

adudani
Super User
Super User

hi @yosefzav ,
Maybe try using the sort functionality available by hovering over the column  of the matrix and right clicking near the arrow shown below?

 

adudani_0-1704839143294.png

 

if not , create a measure with calculate and in the filter context count those values having the relevant stage. using that in the last row of the matrix could help sorting ( note: would required not expanding into the last level of hierarchy)

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.