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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
AlexS2023
Helper I
Helper I

Matrix how to Sort within Nested Rows?

Hi all,

 

I have a matrix showing how many employees we've assigned to a given "cost center" by date, with additional rows to show the employee names. This worked great, but now I've been asked to include the Employee's Job-Title too, which is proving trickier than it sounds...

 

If I just add Job-Title to the rows, I get a third level of nested data, which is not helpful at all, but I can't add it to the columns because that then repeats the timeline for every possible job-title!

 

So, I created a custom column to show the Job-Title next to the Employee name (as if it was a second column in the Y axis - see screenshot). This moved me in the right direction, but leaves two Questions:

 

1. The records are sorted alphabetical by Employee Name, it would be much more useful to sort by Job-Title. Is there a way I can do this? I *could* just swap the name for the job-titles in the custom column (which would be an acceptable compromise) except...

 

2. I need to add a slicer, so managers can filter the employees by job-title. I figure this means I *have* to get the actual job-title into the matrix somewhere, but I don't want it to be visible. is there anyway to add the data without screwing with anything else?

 

Open to all ideas and workarounds 🙂

 

TIA

ASpbi shot1.jpg

 

2 ACCEPTED SOLUTIONS
audreygerred
Super User
Super User

For point 1 - I agree, just swap it.

For point 2 - you can have a slicer on the canvas or put the field in teh filter pane that only has the job title and the user can use that to filter to what they want - it doesn't need to be part of the matrix visual. Another option if you would prefer to keep name and title separate it to simply turn off the stepped layout under the Rows settings.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Hi! You absolutely can, depending on what it is you want to sort. For example, if you want to sort title in a non-alphabetical way, you can assign each item a numerical value in the order you want, then sort the title by the numeric value - this way when you use Title, it is sorted in the order you assigned without having to have the numeric value actually in the visual (this is also the same way you would have month name sorted correctly by chronology, not alphabetically). Sort one column by another column in Power BI - Power BI | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
audreygerred
Super User
Super User

For point 1 - I agree, just swap it.

For point 2 - you can have a slicer on the canvas or put the field in teh filter pane that only has the job title and the user can use that to filter to what they want - it doesn't need to be part of the matrix visual. Another option if you would prefer to keep name and title separate it to simply turn off the stepped layout under the Rows settings.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks AudreyGerred. I was clearly overthinking this one.

 

Just on point 1, do you think there would be a method (to sort by a hidden field)? I know I can live without it - but I can already here my manager asking anyway 😂

Thanks,

Hi! You absolutely can, depending on what it is you want to sort. For example, if you want to sort title in a non-alphabetical way, you can assign each item a numerical value in the order you want, then sort the title by the numeric value - this way when you use Title, it is sorted in the order you assigned without having to have the numeric value actually in the visual (this is also the same way you would have month name sorted correctly by chronology, not alphabetically). Sort one column by another column in Power BI - Power BI | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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