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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors