cancel
Showing results for 
Search instead for 
Did you mean: 
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

Accepted Solutions
Microsoft v-huizhn-msft
Microsoft

Re: Create hierarchies from a column of a database

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
richbenmintz
Advisor

Re: Create hierarchies from a column of a database

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.

Microsoft v-huizhn-msft
Microsoft

Re: Create hierarchies from a column of a database

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors