What is Create Hierarchy in Power BI?

Cody Schneider8 min read

Drilling down into your data shouldn't feel like a chore, but in a flat list of metrics, it often does. Creating a hierarchy in Power BI is an essential technique for organizing your data logically, allowing you and your team to explore information from a high-level overview down to the finest details with just a few clicks. This article will walk you through exactly what a hierarchy is, why it's so useful, and how you can create one in just a few minutes.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

What Exactly is a Hierarchy in Power BI?

Think of the way you organize files on your computer. You probably have a main folder like "Marketing Reports," and inside that, you have subfolders for "Q1," "Q2," "Q3," and "Q4." Inside the "Q1" folder, you might have folders for "January," "February," and "March." This nested structure is a perfect real-world example of a hierarchy.

In Power BI, a hierarchy is a defined relationship between two or more columns in your data model that follow a similar parent-to-child logic. It groups related fields into a logical tree that you can use to "drill down" for more detail or "drill up" for a broader summary in your visuals.

The most common and intuitive examples are:

  • Dates: Year → Quarter → Month → Day
  • Geography: Country → State/Province → City → ZIP Code
  • Products: Category → Subcategory → Product Name

Without a hierarchy, if you wanted to see sales by year, then by month, then by day, you would have to manually add and remove the Year, Month, and Day fields from your visual each time. With a hierarchy, you simply click an icon on your chart, and Power BI handles the rest, smoothly transitioning you between levels of detail.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

The Main Benefits of Using Hierarchies

Taking a moment to set up hierarchies in your data model might seem like an extra step, but it pays off significantly by making your reports much more powerful and user-friendly.

1. An Intuitive User Experience

Hierarchies are the key to building interactive drill-down reports. When you place a hierarchy in a visual, Power BI automatically adds icons that let users navigate up and down through the levels. This is far more intuitive for your audience — who may not be Power BI experts — than asking them to find and drag fields from the Data pane.

2. Faster and More Fluid Analysis

Imagine you’re looking at annual sales and notice a surprising spike in one year. Instead of building a new chart or fumbling with fields, you can instantly drill down into quarters, then months, to pinpoint exactly when the increase happened. This fluid experience helps you follow your train of thought and uncover insights much faster.

3. Cleaner and More Organized Data Pane

If your dataset has dozens or hundreds of columns, the Data pane can quickly become a mess. Hierarchies help you tidy things up by collapsing multiple related columns (like Year, Quarter, Month, and Day) into a single, neat hierarchical field. This makes your data model easier for you and other report creators to navigate.

4. Enforces Consistency

When you define a hierarchy in the data model, you create a single source of truth for that layered relationship. Everyone who uses that dataset to build reports will use the same logical drill-down path, ensuring consistency across all company reports. No more guessing whether to drill from Category to Brand or Category to Subcategory.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

How to Create a Hierarchy in Power BI: A Step-by-Step Guide

Thankfully, creating a hierarchy is straightforward. There are a couple of ways to do it, but the most common one is right in the Data pane.

Method 1: Using the Data Pane (Recommended for Beginners)

Let's create a standard "Geography" hierarchy using the fields Country, State, and City.

  1. Find Your Fields: In the Data pane on the right side of your Power BI canvas, locate the columns you want to group together. In this case, find your Country, State, and City fields.
  2. Create the Base Level: Right-click on the field that represents the highest level of your hierarchy. For our example, right-click on the Country field. From the context menu that appears, select Create hierarchy.
  3. Name Your Hierarchy: Power BI will automatically create a new hierarchy named "Country hierarchy" and will place the Country field inside it as the first level. You can rename this by right-clicking it and selecting Rename. A good name might be "Location" or "Geography."
  4. Add Lower Levels: Now, you can add the other fields. Drag the State field from your fields list and drop it directly onto your new hierarchy. Then, drag and drop the City field onto the hierarchy.
  5. Order the Levels: The fields will appear in the hierarchy in the order you added them. It's crucial that they are ordered from the broadest level to the most specific. It should look like this:
  • Country
  • State
  • City

If the order is wrong, you can simply drag and drop the levels within the hierarchy itself to correct it.

That's it! You now have a reusable hierarchy you can drag into any chart, table, or matrix.

Method 2: Using the Model View

If you're working with a more complex data model, the Model view can be a more visual way to group your fields.

  1. Switch to Model View: On the left side of the Power BI window, click on the icon for Model view.
  2. Select Multiple Columns: In the table card that contains your data, find your fields. Hold down the Ctrl key and click on Country, State, and City to select them all at once.
  3. Create the Hierarchy: Right-click on your selected fields, and from the context menu, choose Create hierarchy.
  4. Check and Order: Power BI will create a new hierarchy containing these fields. Just like with the other method, double-check that the order is correct (Country > State > City) and rename the hierarchy to something logical.

Once your hierarchy is created, drag it onto a visual like a clustered column chart. You'll see several new arrow icons appear in the header of the visual. Click them to explore your data at different levels of granularity.

Real-World Examples of Common Hierarchies

Theory is one thing, but seeing how hierarchies are used in practice is the best way to understand their value.

Example 1: The Go-To Date Hierarchy

Every business analysis needs to look at trends over time. Manually adding date fields is slow and clunky.

  • Structure: Year > Quarter > Month > Day
  • Use Case: Create a single line chart showing total sales. Start with a view of sales by year. Then, drill down to spot which quarter had the best performance, and drill down again to see which individual months drove that success.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Example 2: The E-commerce Product Hierarchy

If you're selling products online, understanding performance by category is fundamental. A product hierarchy lets you see the bigger picture before narrowing your focus.

  • Structure: Product Category > Sub-Category > Brand > Product SKU
  • Use Case: Your bar chart of sales by Category shows that "Electronics" is your top performer. With a single click, you drill down to see that "Smartphones" is the winning sub-category. Another click reveals which brands are driving those smartphone sales.

Example 3: The Sales Team Hierarchy

For sales managers, understanding performance from the top down is critical for coaching and resource allocation.

  • Structure: Sales Director > Sales Manager > Sales Representative
  • Use Case: A dashboard shows performance against quota by Sales Director. A manager can then drill down to see the performance of the managers who report to them, and finally drill down further to see how each individual representative is performing.

A Few Best Practices

To get the most out of your hierarchies, keep these tips in mind:

  • Logical Order is Everything: Always arrange levels from the highest, most-general category to the lowest, most-specific one. An incorrect order (e.g., City > Country) will make the drill-down function useless.
  • Keep Them Lean: Avoid creating overly-deep hierarchies with too many levels (e.g., more than 5 or 6). They can become confusing to navigate. If you need more detail, consider creating a separate, more focused report.
  • Use Clear Names: Name your hierarchies and their levels logically. Your end-users shouldn't have to guess what "Prod Hir V2" means. "Product Breakdown" is much clearer.

Final Thoughts

Creating hierarchies is a simple yet powerful feature in Power BI that transforms static reports into interactive tools for exploration. By logically grouping related fields, you enable an intuitive drill-down experience that helps you and your team find meaningful insights faster, all while keeping your data model clean and organized.

While features like hierarchies make tools like Power BI incredibly capable, the initial setup - configuring data models, building visuals, and arranging drill-down paths - still requires manual effort. Tapping into the true potential of your data shouldn't be held back by complex setup or learning new tools. At Graphed, we built our platform around natural language to eliminate that friction entirely. Rather than manually building a visual and a hierarchy to explore sales by country, state, and city, you can simply ask, "Show me a chart of sales by location," and our AI instantly handles the drill-down for you. We find that this removes the friction, allowing teams to explore their data on the fly and spot insights without getting bogged down in the setup.

Related Articles