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
atlasB
Frequent Visitor

Beginner question: categorical hierarchies

Hi, I am new to power bi (pbi), but I have played with power pivot (PP) before.

 

I want to know how to create a categorical hierarchy in pbi. My goal is to have a stacked column chart, with the date on the x-axis and the hierarchy in the legend, so I can drill down into the child categories. I can do this in PP.

 

In PP I can just right click on the fields and select 'create hierarchy', and then use this created field as the legend. However, I don't know how to create this hierarchy in pbi.

 

I am using a csv exported from YNAB (budgeting software). It has three columns that might be useful:

  • 'category group' (the parent level, contains blanks)
  • 'category' (the child level, contains blanks)
  • 'category group/category' (a concatenation of the two above, contains blanks)

In PP I right-click on 'category group' and 'category' and voila, the hierarchy option is available.

 

Any help greatly appreciated.

 

Thanks.

3 REPLIES 3
parry2k
Super User
Super User

under the table , just drag you column and drop on 2nd column and it will create hierarchary. keep on dropping more field on to this and fields will get added to hierarchary.

 

Once it is create, you can move the fields with hierarchary and remove from it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks, that helps me how to create a hierarchy.

 

However, when I place this hierarchy field in the 'legend' spot (in a stacked column chart), only the parent level goes across. Is there a way to take all levels of a hierarchy into a legend field so that I can drill down via legend?

 

Thanks.

Hi @atlasB,

 

You can right click on that column and choose hierarchy mode if it available.

12.PNG

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.