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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
boudy
Frequent Visitor

Custom Matrix hierarchy rows sorting

Hi all,

 

I have a matrix visual where the rows follow a hierarchy structure. My problem is,  PowerBI sorts the rows based on a alphabetical sorting. And I would like to custom this sorting. See below my 3 levels (level 1 is the higest one). The Order column is the order that I would like to apply. 

To do my visaul, I created a hierarchy with this 3 levels to properly display it in the Matrix. And I used a DAX function to handle the null values in my visual. Everything is working fine except the order of my rows. Because Power BI uses a default sorting, and i don't know how to custom this order. 

Problem 1 : I cannot sort each column based on my Order column while Power BI does not allow sort with duplicates values

Problem 2 : While duplicate values is not allow, i tried to sort based on multiple columns (the 3 levels), but not supported by PowerBI yet

The only solution that I have right now is to put a suffix 1. , 2., 3., ... or letters  to create my order. But, I cannot use this solution in my case.

Thanks for your help 

 

2 REPLIES 2
amitchandak
Super User
Super User

@boudy 

I think as of Sort column is the only option,

You can also refer :https://community.powerbi.com/t5/Desktop/Sorting-by-multiple-columns/m-p/536884#M251918

 

In March -2020, Multiple column sort has been provided on Table.  For matrix, we have to wait

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-march-2020-feature-summary/

 

Thanks @amitchandak  for your reply.

 I took a look in the post that you referred to me and I'm not DAX expert but my comprehension after read this post is that : Do I need to create a new measure ? What I need to sort are Dimensions (Level1, Level2, Level3), so the measure are calculations and honestly I do not see how to translate the post option to my case. Do I need to change my hierarchy in DAX function ?

Thanks a lot

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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