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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sylwestercz
Helper I
Helper I

Parent-Child Hierarchy - sorting issue

Hi All,

 

I hope you can put some light into my problem. 

 

I have a Profit&Loss with Parent-Child hierarchy with 4 levels and everything works fine except one tiny detail. When I have all my data in the matrix, expanded all the way down all the account names are in the alphabetical order instead of the order I want them to be (see dummy example below).

 

In my Parent-Child hierarchy with all the DAX codes etc, I have an index column, and tried to sort the Child columns by that index however it does not work. 

 

I wonder if anyone had similar issue? Any help will be highly appreciated. Thank you.

 

Capture.JPG

1 ACCEPTED SOLUTION

@sylwestercz

I am afraid that it is not possible to sort the level4. A workaround is to add number(1,2,3) before these values as below.

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

5 REPLIES 5
sarath_chandra
Helper III
Helper III

@v-yuezhe-msft , @sylwestercz 

can you please let me this task possible in power bi or not

input file structure

sarath_chandra_0-1691825803295.png

output requirement

sarath_chandra_1-1691825850417.png

@v-yuezhe-msft  please help me out with your solution

v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@sylwestercz,

How do you store these data in your table? Could you please post the structure of your table with the Index column? And also please post the error message you get when sorting columns.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia @v-yuezhe-msft

 

Please see below how my hierarchy looks like. 

 

In the Matrix visual I put Hierarchy (Level1 & Level2 & Level3 & Level4) as Rows and a measure as Values. The thing is that all hierarchy levels are presented alphabetically and I would like to find a way to make their appeareance in the Matrix as per AccountKey. 

 

If instead of Hierarchy I put just AccountName in Rows, then everything is listed as per AccountKey however then I do not have the Parent-Child hierarchy, just the lowest level Account with corresponding value. In other words, Contribution Margin, Primary Costs, Salary, Other Costs are not presented in the Matrix. 

 

The more I look into this the more I get the feeling it will not be possible...

 

hierarchy.JPG

@sylwestercz

I am afraid that it is not possible to sort the level4. A workaround is to add number(1,2,3) before these values as below.

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft

 

And that is exactly what I did now for Level 3 and will to the same for Level 4, perhaps with letters like a) b) c) .... but that requires changing (or adding lookup column) in the main source with all AccountName(s) so the relationship will follow along the chain. 

 

Hopefully this will be recognized by Microsoft and (if there is a way) fixed or improved in the future. 

 

Thank you Lydia!

Have a great day and Merry Christmas! 

Sylwester

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.