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
Anonymous
Not applicable

Create hierarchies from a column of a database

In my database, I have a column that has an account hierarchy as below:

 

1

11

111

112

1111

1112

2

21

211

2111

 

And so on...

I would like to establish a hierarchy scheme in PowerBI, where I can add all the values from the selected account down.
I do not know yet if I can do this in PowerBI or I'll have to do some mechanism in the database.

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

As the @richbenmintz said, structure of your resource table need to be changed. There are some arctile about parent and child, please review.

Parent-Child Hierarchies
Understanding Functions for Parent-Child Hierarchies in DAX

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

As the @richbenmintz said, structure of your resource table need to be changed. There are some arctile about parent and child, please review.

Parent-Child Hierarchies
Understanding Functions for Parent-Child Hierarchies in DAX

Best Regards,
Angelia

richbenmintz
Solution Sage
Solution Sage

In order to Achieve what you are after you would have to turn your single column into at least two column parent and child. Once that is done you can use the parent child functions in dax to flatten your P/C table into a standard dimension. If you are going to do the work to create the P/C table in the DB you are probably best to do all of the work in the database as you will get better sizing and compression; calculated Columns in Power BI are not compressed.



I hope this helps,
Richard

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

Proud to be a Super User!


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.