How to Edit Hierarchy in Power BI
Hierarchies in Power BI turn a static chart into an interactive story, allowing you to drill down from a high-level overview into granular details. But what happens when you need to change that story - reorder the levels, add a new dimension, or remove an old one? This guide will walk you through exactly how to create and edit hierarchies in Power BI so you can fine-tune your data exploration experience.
What Exactly is a Hierarchy in Power BI?
Think of a hierarchy as a structured ladder for your data. It organizes related fields into logical levels that you can climb up or down. A classic example is a date hierarchy, which typically follows a path from greater to smaller time units:
- Year
- Quarter
- Month
- Day
Another common example is geography (Country > State > City) or product categories (Category > Subcategory > Product Name). The main benefit of setting up a hierarchy is to enable Power BI’s powerful "drill-down" and "drill-up" features in your visuals. Instead of creating separate charts for sales by year, by quarter, and by month, you can build a single chart and let users explore the different levels of detail themselves. This not only saves space on your report canvas but also makes your dashboards much more dynamic and insightful.
How to Create a New Hierarchy in Power BI
Before you can edit a hierarchy, you first need to create one. The process is straightforward and takes just a few clicks in the Power BI Desktop. Let’s build a basic "Product Hierarchy" using product data as an example.
Step 1: Locate Your Data Fields
On the right side of your Power BI Desktop window, you’ll find the Data pane (sometimes called the Fields pane). This is where all the tables and fields from your data model are listed. Find the table that contains the fields you want to group, like "Category," "Subcategory," and "Product."
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Step 2: Start the Hierarchy
The easiest way to start a hierarchy is to identify the field that will be at the very top level. In our product example, this would be "Category." Right-click on the Category field in the Data pane. From the context menu that appears, select Create hierarchy. Instantly, Power BI will create a new item in your Data pane called "Category hierarchy," marked with a special hierarchy icon. Underneath it, you'll see the "Category" field as its first level.
Step 3: Rename Your Hierarchy (Recommended)
Power BI's default name is functional but not always descriptive. It's good practice to give your hierarchy a clear, meaningful name. Right-click on "Category hierarchy" and select Rename. Let's call it "Product Rollup" or something similar that clearly indicates its purpose.
Step 4: Add More Levels to the Hierarchy
Now it's time to build out the lower levels of your hierarchy. To add "Subcategory" as the second level, find the "Subcategory" field in your Data pane. Then, simply click and drag it directly on top of your new "Product Rollup" hierarchy. Power BI will add it as the second level. You can repeat this process for any other levels. For instance, you could drag the "Product Name" field onto the hierarchy to make it the third and final level. Your "Product Rollup" hierarchy in the Data pane should now show:
- Category
- Subcategory
- Product Name
You can also add fields by right-clicking them, selecting Add to hierarchy, and choosing your target hierarchy from the list. This method is useful if you have many hierarchies and want to be precise.
Editing Your Power BI Hierarchy: The Core Techniques
Once a hierarchy is created, you're not locked in. Your data needs might change, or you might spot a mistake. Editing hierarchies is just as simple as creating them and involves similar drag-and-drop and right-click actions in the Data pane.
Reordering Levels Within a Hierarchy
Perhaps you accidentally added "Month" before "Quarter" in your date hierarchy, or you decide that exploring by city before state makes more sense for your particular report. Fixing the order is easy. In the Data pane, expand your hierarchy to see all its levels. To change the order, just click and drag a field to a new position within that hierarchy list. For example, to move "Quarter" above "Month," you would click on "Month," drag it down below "Quarter," and release. The change is instant, and any visuals using that hierarchy will update to reflect the new drill-down order.
Adding or Removing Fields from a Hierarchy
Business requirements change, and you may need to adjust the depth of your hierarchy.
To Add a New Level:
Adding a new level to an existing hierarchy works exactly the same way as it did during creation. Find the desired field in the Data pane and drag it into the hierarchy, dropping it at the position you want. For example, if you wanted to add "Brand" between "Subcategory" and "Product Name," you would just drag the "Brand" field and release it between those two existing levels.
To Remove a Level:
Removing a field is just as simple. In the Data pane, expand the hierarchy and find the level you want to remove. Right-click on that field and you'll see a few options. Here, it's important to choose the right one:
- Remove from hierarchy: This selection is what you'll want to use most of the time. It only removes the field from this specific hierarchy group. The field itself remains available in your data model, and you can still use it elsewhere in your report.
- Delete from model: Be very careful with this option. This permanently deletes the field from your entire Power BI file. It will disappear from the Data pane completely, and any visuals using it (not just the hierarchy) will break.
Renaming a Hierarchy or its Levels
Clear labeling is essential for a user-friendly report. You can rename the entire hierarchy or the individual levels within it.
- To rename the hierarchy itself, right-click its top-level name (e.g., "Product Rollup") in the Data pane and select Rename.
- To rename an individual level, right-click the specific field inside the hierarchy and select Rename. Keep in mind that renaming a field here changes its name across the entire report, not just inside the hierarchy. This change will be reflected in any other visuals using that field.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Putting Your Hierarchies to Work: Drill-Down Functionality
Creating and editing hierarchies is just the setup. The real value is unlocked when you use them in visualizations to create an interactive drill-down analysis. First, add a visual to your report canvas, like a bar chart or matrix. Instead of dragging individual fields to the Axis/Rows well, drag the entire hierarchy object (e.g., "Product Rollup") into that field well. Then, add a measure like "Total Sales" to the Values well.
Immediately, you'll notice new icons appearing in the header of your visual. These control the drill-down experience:
- Turn on Drill Down (single down arrow): Click this to activate drill mode. Now, when you click on a specific bar in your chart (e.g., the "Accessories" category), the chart will filter and navigate down to show you the subcategories within only Accessories. This is the most common and intuitive way for users to explore.
- Go to the next level in the hierarchy (forked down arrow): This expands all items at the current level. For instance, if you're viewing sales by Category, clicking this button will change the chart to show sales by Category and Subcategory together (e.g., "Accessories - Fenders," "Bikes - Mountain Bikes").
- Drill Up (single up arrow): This navigates you one level back up in the hierarchy.
Tips and Common Pitfalls
Hierarchies are powerful, but a few best practices can help you avoid common issues.
- Keep it Logical: The order of your hierarchy should follow a natural, logical progression that your end-users will intuitively understand. Date, geography, and product structures are perfect candidates.
- Don't Go Too Deep: While you can, avoid creating hierarchies with more than 4 or 5 levels. Overly deep hierarchies can become confusing for users to navigate and may impact report performance.
- Drill Icons Aren't Showing Up? If the drill-down arrows are missing, double-check that you dragged the entire hierarchy object into the visual, not just the individual fields one by one. Certain visual types may also not support hierarchies.
- Check Your Data Model: For drilling to work correctly, the data tables containing your hierarchy levels need to have proper relationships defined in Power BI's Model view. If you drill down from Category to Subcategory and the numbers look wrong, an incorrect table relationship is often the culprit.
Final Thoughts
Mastering hierarchies in Power BI is a fundamental step toward building truly professional and user-friendly reports. By grouping related fields, you transform your visuals from static images into explorable data landscapes and give your audience the power to find their own insights. Editing those hierarchies is a simple process of dragging, dropping, and right-clicking, ensuring your reports can evolve along with your business questions.
While features like hierarchies make data easier to explore once they're built, what if you could skip much of the building process? That's where we wanted to make things even simpler with Graphed. Instead of manually creating visuals and hierarchies, you can connect your data sources and just ask plain-English questions. A request like "show me our sales broken down by product category and subcategory over the last quarter" instantly generates an interactive chart with all the right groupings, saving you the time and effort of report configuration so you can get straight to the analysis.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.