Skip to main content




Power BI hierarchies provide you with the drilldown action of the BI report. Let me show you how to create a hierarchy in Power BI reports with an example.

How to create a hierarchy in Power BI

To demonstrate creating hierarchies in Power BI, we'll use the table we created in the article Combine Multiple Tables.

create-hierarchy-in-power-bi-1-5356465

There are a couple of ways to create a hierarchy.

The first approach to creating hierarchy in Power BI

To create a new hierarchy in Power BI, drag and drop one field onto the other. Automatically creates a hierarchy for you. To demonstrate the same in Power BI, we dragged the product subcategory into the product category field.

create-hierarchy-in-power-bi-2-4602603

Now you can see the newly created hierarchy.

create-hierarchy-in-power-bi-3-8936823

The first approach to adding fields to a Power BI hierarchy

Drag and drop the required field into the newly created hierarchy. Let me drag the color field.

create-hierarchy-in-power-bi-4-5314846

You can now see the Color field within the hierarchy.

create-hierarchy-in-power-bi-5-8976914

The second approach to adding fields to a Power BI hierarchy

Select the field you want to add (let me select the product) and right-click on it to open the context menu. Select Add to hierarchy and then select the hierarchy name (Product Category Hierarchy)

create-hierarchy-in-power-bi-6-6847494

Now you can see the Product under the hierarchy.

create-hierarchy-in-power-bi-7-3525715

Change hierarchy levels in Power BI

Be careful when setting the hierarchy levels. For example, if you have the State column above Country, then Level 1 is State and Level 2 is Country.

Select the field in which you want to change the position or level. Then right-click on it and select the Move Up (or Move Down) option from the context menu. Alternatively, drag and drop the field to the required position.

create-hierarchy-in-power-bi-8-8688636

Now you can see the product in the third position.

create-hierarchy-in-power-bi-9-2602457

Rename the hierarchy in Power BI

Select the hierarchy you created and right-click on it to open the context menu. Select the Rename option from the context menu. Alternatively you can double click on the hierarchy name

create-hierarchy-in-power-bi-10-2685453

Let me rename it as product hierarchy

create-hierarchy-in-power-bi-11-6424890

Now you can see the new name

create-hierarchy-in-power-bi-12-6491520

Delete hierarchy in Power BI

Select the hierarchy you delete and right-click on it to open the context menu. Select the Delete option from the context menu.

create-hierarchy-in-power-bi-13-1997518

Click the Delete button to confirm the delete operation.

create-hierarchy-in-power-bi-14-4397202

The second approach to creating a hierarchy in Power BI

Select the file you want to use in the hierarchy and right-click to open the context menu. Select the New hierarchy option from the context menu.

create-hierarchy-in-power-bi-15-4518820

Create a new hierarchy for yourself.

create-hierarchy-in-power-bi-16-9696612

Let me add a few more fields

create-hierarchy-in-power-bi-17-4384444

Remove fields from the hierarchy

Select the field that you want to remove or remove from the hierarchy. Then right click on it and the Delete option from a context menu.

create-hierarchy-in-power-bi-18-6634755

Click the Remove button to remove the Color field from the hierarchy.

create-hierarchy-in-power-bi-19-2285032

You can see the same in the following screenshot.

create-hierarchy-in-power-bi-20-5989470

Again, we add the Color field and rename the hierarchy as Product Information.

create-hierarchy-in-power-bi-21-8331526




Power BI hierarchies provide you with the drilldown action of the BI report. Let me show you how to create a hierarchy in Power BI reports with an example.

How to create a hierarchy in Power BI

To demonstrate creating hierarchies in Power BI, we'll use the table we created in the article Combine Multiple Tables.

create-hierarchy-in-power-bi-1-5356465

There are a couple of ways to create a hierarchy.

The first approach to creating hierarchy in Power BI

To create a new hierarchy in Power BI, drag and drop one field onto the other. Automatically creates a hierarchy for you. To demonstrate the same in Power BI, we dragged the product subcategory into the product category field.

create-hierarchy-in-power-bi-2-4602603

Now you can see the newly created hierarchy.

create-hierarchy-in-power-bi-3-8936823

The first approach to adding fields to a Power BI hierarchy

Drag and drop the required field into the newly created hierarchy. Let me drag the color field.

create-hierarchy-in-power-bi-4-5314846

You can now see the Color field within the hierarchy.

create-hierarchy-in-power-bi-5-8976914

The second approach to adding fields to a Power BI hierarchy

Select the field you want to add (let me select the product) and right-click on it to open the context menu. Select Add to hierarchy and then select the hierarchy name (Product Category Hierarchy)

create-hierarchy-in-power-bi-6-6847494

Now you can see the Product under the hierarchy.

create-hierarchy-in-power-bi-7-3525715

Change hierarchy levels in Power BI

Be careful when setting the hierarchy levels. For example, if you have the State column above Country, then Level 1 is State and Level 2 is Country.

Select the field in which you want to change the position or level. Then right-click on it and select the Move Up (or Move Down) option from the context menu. Alternatively, drag and drop the field to the required position.

create-hierarchy-in-power-bi-8-8688636

Now you can see the product in the third position.

create-hierarchy-in-power-bi-9-2602457

Rename the hierarchy in Power BI

Select the hierarchy you created and right-click on it to open the context menu. Select the Rename option from the context menu. Alternatively you can double click on the hierarchy name

create-hierarchy-in-power-bi-10-2685453

Let me rename it as product hierarchy

create-hierarchy-in-power-bi-11-6424890

Now you can see the new name

create-hierarchy-in-power-bi-12-6491520

Delete hierarchy in Power BI

Select the hierarchy you delete and right-click on it to open the context menu. Select the Delete option from the context menu.

create-hierarchy-in-power-bi-13-1821957

Click the Delete button to confirm the delete operation.

create-hierarchy-in-power-bi-14-4397202

The second approach to creating a hierarchy in Power BI

Select the file you want to use in the hierarchy and right-click to open the context menu. Select the New hierarchy option from the context menu.

create-hierarchy-in-power-bi-15-1005263

Create a new hierarchy for yourself.

create-hierarchy-in-power-bi-16-5698822

Let me add a few more fields

create-hierarchy-in-power-bi-17-8815015

Remove fields from the hierarchy

Select the field that you want to remove or remove from the hierarchy. Then right click on it and the Delete option from a context menu.

create-hierarchy-in-power-bi-18-5019234

Click the Remove button to remove the Color field from the hierarchy.

create-hierarchy-in-power-bi-19-1866672

You can see the same in the following screenshot.

create-hierarchy-in-power-bi-20-5599271

Again, we add the Color field and rename the hierarchy as Product Information.

create-hierarchy-in-power-bi-21-5669026
R Marketing Digital