To build a hierarchical table in Power BI, you create a table visual and drag a hierarchy (or multiple related fields) into its Rows well, then expand or collapse levels as needed. The result is a single table that lets viewers drill from a high-level category down to detailed records without switching pages or visuals. You do not need a special visual type: the standard Table visual supports hierarchies natively, and you can also create a hierarchy from scratch in the Model view if your data does not already have one.

What You'll Need

  • Power BI Desktop (or Power BI service for editing in the browser) and a dataset already loaded.
  • At least two related fields that form a logical parent-child relationship (for example, Category and Subcategory, or Region and City).
  • Basic familiarity with the Fields pane and the Visualizations pane.

Step-by-Step

  1. Open your report in Power BI Desktop and make sure the fields you want to nest are visible in the Fields pane. If they are in different tables, confirm there is a relationship between those tables in Model view; without a relationship, the hierarchy will not filter correctly.
  2. Create a hierarchy (optional but recommended). Go to Model view, right-click the top-level field (for example, Category), and choose Create hierarchy. A new hierarchy item appears. Then drag the child field (for example, Subcategory) onto the hierarchy, or right-click the child field and choose Add to hierarchy and select the hierarchy. Repeat for any deeper levels. Labels can differ slightly by version, so look for the hierarchy commands in the right-click menu.
  3. Switch to Report view and select the Table visual from the Visualizations pane, or select an existing table on the canvas.
  4. Add the hierarchy to the Rows well. In the Fields pane, click the hierarchy (or drag it) into the Rows area of the Visualizations pane. If you did not create a hierarchy, simply drag the parent field first, then the child field beneath it in the Rows well; Power BI will treat the stacked fields as levels.
  5. Expand and collapse levels. In the table visual, use the small arrows next to each row, or the expand/collapse icons in the visual header, to move between levels. You can also set the visual to show all levels expanded by default using the expand-all option in the visual header, or by adjusting the visual's row settings.
  6. Format the table for readability. With the table selected, open the Format pane (the paint roller icon). Under Grid, turn on row padding and banded rows if you want clearer separation. Under Column headers, adjust text size and alignment. Under Values, set font size and alternate background colors. These labels vary slightly by Power BI version, so look for the closest matching section.
  7. Add a measure or numeric field (optional). Drag a value such as Sales Amount into the Values well. The table will now show the measure at each hierarchy level, aggregating correctly as you expand or collapse.
  8. Control default expansion. In the Format pane, look for the Row headers section and set Stepped layout on or off. Stepped layout indents child levels under parents, which makes the hierarchy easier to read. You can also set the visual to start collapsed by using the collapse-all icon in the visual header.
  9. Test the interaction. Click a parent row and confirm that other visuals on the page filter to that level. If cross-filtering does not work, check the relationship direction in Model view.
  10. Save and publish. Save the .pbix file, then publish to the Power BI service. In the service, viewers can expand and collapse levels the same way, provided the visual is not locked down by a custom layout.

Common Mistakes

  • Dragging fields from unrelated tables. If the parent and child fields come from tables with no relationship, the hierarchy will show blank or duplicated rows. Always verify relationships in Model view first.
  • Stacking fields without a hierarchy. You can stack fields directly in the Rows well, but you lose the named hierarchy and the ability to reuse it across visuals. Creating a proper hierarchy saves time later.
  • Forgetting to set the sort order. Hierarchies sort by the underlying column, not by the order you dragged them. If levels appear out of order, use Sort by column in Data view to set a sort column.
  • Using a matrix instead of a table. A matrix supports hierarchies too but behaves differently with subtotals and stepped layouts. If you want a flat table with expandable rows, use the Table visual.
  • Leaving stepper layout off. Without stepped layout, child rows appear at the same indent as parents, which makes the hierarchy hard to follow.

Tips

  • Name hierarchies clearly (for example, Product Hierarchy) so report authors can find them quickly in the Fields pane.
  • Keep hierarchies to three or four levels. Deeper nesting makes tables hard to scan on a dashboard.
  • Use the Stepped layout option in the Format pane to indent child levels; it is the single biggest readability improvement for hierarchical tables.
  • If you need the same hierarchy in several visuals, build it once in Model view and reuse it.
  • Consider adding a measure to the Values well so each level shows a meaningful total, not just labels.

Troubleshooting

The hierarchy shows blank rows. This usually means a missing relationship or a direction issue. Open Model view, select the relationship line, and confirm the cross-filter direction. If the tables are unrelated, create a relationship on a shared key.

Expand arrows do not appear. Make sure you dragged a hierarchy or at least two fields into the Rows well. A single field cannot expand. Also check that the visual is a Table or Matrix, not a card or chart.

Levels appear in the wrong order. Power BI orders levels by the order you add them. Remove and re-add fields in the correct order, or edit the hierarchy in Model view by dragging levels up or down.

The table is slow with large datasets. Reduce the number of levels, remove unnecessary columns from the Rows well, and consider aggregating data in Power Query before loading. Very large hierarchies can also hit visual row limits; use filters or Top N to limit rows.

Cross-filtering does not work when clicking a level. Check that the relationship is active and that the visual is not set to ignore filters. In the Format pane, under Interactions, confirm the visual is set to filter other visuals.

Frequently Asked Questions

Can I create a hierarchy without using Model view?

Yes. You can drag multiple fields directly into the Rows well of a table visual; Power BI will treat them as levels. However, creating a named hierarchy in Model view is cleaner and reusable across visuals.

Does a hierarchical table work in the Power BI service?

Yes. Once published, viewers can expand and collapse levels in the service, provided the report author has not disabled the visual header icons. Editing the hierarchy itself requires Desktop or edit permissions in the service.

What is the difference between a table and a matrix for hierarchies?

A table shows a flat list with expandable rows. A matrix adds row and column groupings plus subtotals and grand totals. Use a table for simple drill-down lists and a matrix when you need cross-tabulated totals.

Can I control which level opens by default?

You can set the visual to start collapsed or expanded using the expand-all and collapse-all icons in the visual header, and you can adjust stepped layout in the Format pane. Default expansion state is saved with the report.

Why does my hierarchy show duplicate rows?

Duplicates usually come from a missing relationship or from stacking fields that are not truly parent-child. Check the relationship in Model view and confirm each child value belongs to exactly one parent.

Can I use a hierarchy in a slicer?

Slicers do not support multi-level hierarchies the same way tables do. For hierarchical filtering, use a matrix or table with drill-down, or create separate slicers for each level.