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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
woscie
Frequent Visitor

Sort Problem with Matrix

Dear Friends,

I have created an hierarchical structure based on the post  to categorize employees HR data at multiple level. I used martix to display sum of values at multiple levels:

https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-display-2-levels-of-Hierarchy...

at level one I have one column year, at level 2 I have 4 columns, at level three I have different number of columns per level 2 columns and rows are employees name.

now when I want to sort values at the level 1 it doesn't work correctly.

How can I sort HR data per columns at multiple levels?

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @woscie ,

 

Thanks for reaching out to our community.

Actually, I quite don't understand what you mean about one column year at level 1, 4columns at level 2. Can you please create some dummy data and display the expected result or give examples of the wrong situation based on the data?

Are you trying to sort the columns of the matrix visual? Below is an example.

vstephenmsft_1-1733208720377.png

If so, unfortunately, this is not supported.

 

Best Regards,

Stephen Tao

 

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

 

 

View solution in original post

3 REPLIES 3
JustSayJoe
Advocate IV
Advocate IV

Step 1: In your Matrix, add a field to the row hierarchy (which you will later remove).

Step 2: Change the Matrix to a Table visual.

Step 3: Sort all the columns you wish to sort, and in the order you wish them to be sorted.

Step 4: Delete the field you previously added in Step 1 from the table.

Step 5: Change the Table back to a Matrix visual.

Step 6: Ensure the right fields are back in the Row hierarchy.

 

This will maintain your multiple sorted fields within your matrix, even when you expand your row hierarchies.

Anonymous
Not applicable

Hi @woscie ,

 

Thanks for reaching out to our community.

Actually, I quite don't understand what you mean about one column year at level 1, 4columns at level 2. Can you please create some dummy data and display the expected result or give examples of the wrong situation based on the data?

Are you trying to sort the columns of the matrix visual? Below is an example.

vstephenmsft_1-1733208720377.png

If so, unfortunately, this is not supported.

 

Best Regards,

Stephen Tao

 

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

 

 

Hi Stephen,

Thanks for your attention

Yes I want to sort matrix by different columns when I drilled down and drilled up. 

not supported 😞

It is a useful and basic feature!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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