Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power BI Table with Subheadings: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can create a table with subheadings in Power BI by using a matrix visual with row hierarchies and stepped layout, or by adding a header row to a table visual. The matrix approach is the most reliable because it groups rows under expandable subheadings automatically. This guide walks through both methods, plus the formatting and troubleshooting details that matter in practice.

What You'll Need

  • Power BI Desktop (latest version recommended; labels can differ slightly by version and region).
  • A dataset loaded into your report. At minimum, you need one column to act as the main heading and another to act as the subheading (for example, Category and Subcategory).
  • Basic familiarity with the Visualizations pane and the Fields well.

Step-by-Step

Method 1: Matrix with Stepped Layout (Recommended)

  1. Open your report in Power BI Desktop and select the Matrix visual from the Visualizations pane. It looks like a grid with row and column headers.
  2. Drag your main heading field (for example, Category) into the Rows well.
  3. Drag your subheading field (for example, Subcategory) into the Rows well directly below the first field. The order matters: the first field becomes the top-level heading, the second becomes the subheading.
  4. Drag a numeric field (for example, Sales) into the Values well. This gives each row something to display.
  5. With the matrix selected, open the Format pane (the paint roller icon). Expand Row headers.
  6. Turn on Stepped layout. This indents subheadings under their parent heading and adds expand/collapse icons, which is what makes the subheading structure readable.
  7. Optionally, adjust the Stepped layout indentation slider to control how far subheadings are indented.
  8. To show subtotals for each heading, expand the Subtotals section in the Format pane and enable Row subtotals. You can also choose whether subtotals appear at the top or bottom of each group.
  9. Resize the visual and test the expand/collapse icons in the report canvas. In reading view, users can expand and collapse groups by clicking the icons next to each heading.

Method 2: Table Visual with a Header Row

  1. Select the Table visual from the Visualizations pane.
  2. Add your subheading field and value fields to the Columns well. A table visual does not support true hierarchical grouping the way a matrix does, so this method is best when you want a flat list with a styled header row.
  3. Open the Format pane and expand Column headers. Turn on the header styling options you want (font, background color, bold).
  4. If you need a visual separator between groups, add a blank row or use conditional formatting on the subheading column to shade rows by category. This is a workaround, not a true subheading feature.
  5. For a more structured look, consider using the matrix method instead; it is the only native way to get expandable subheadings in a table-like visual.

Adding a Calculated Subheading Column (Optional)

  1. If your data does not already have a subheading field, go to the Data view or use Modeling > New column.
  2. Write a DAX expression that concatenates or categorizes your data into a subheading. For example: Subheading = [Category] & " - " & [Subcategory].
  3. Use this new column in the Rows well of the matrix in place of the original subheading field.

Common Mistakes

  • Putting the subheading field in the wrong order. The first field in the Rows well becomes the top-level heading. If subheadings appear above headings, swap the field order.
  • Forgetting to enable Stepped layout. Without it, the matrix shows a flat table and the hierarchy is not visually obvious.
  • Using a table visual when a matrix is needed. Table visuals do not support expandable row hierarchies. If you need collapsible subheadings, use a matrix.
  • Leaving subtotals on when they are not wanted. Subtotals can clutter the view; turn them off in the Format pane if you only want the heading and subheading rows.
  • Assuming formatting carries over to Power BI Service. Most formatting does carry over, but always check the published report in the browser, since rendering can differ slightly.

Tips

  • Use Stepped layout with a small indentation (around 10–15 pixels) for a clean look that still shows hierarchy.
  • Rename fields in the Fields well to friendly names so the headings read well in the visual.
  • Sort the matrix by the heading field to keep groups together; use the visual's sort options in the top-right corner of the visual.
  • If you need multiple levels of subheadings, add more fields to the Rows well. Each additional field becomes a deeper level.
  • Use conditional formatting on the subheading column to alternate row colors by group, which improves readability in wide tables.
  • Test the expand/collapse behavior in reading view, not just edit view, because that is what report consumers see.

Troubleshooting

  • Subheadings do not appear indented: Check that Stepped layout is turned on in Format > Row headers. Also confirm the fields are in the correct order in the Rows well.
  • Expand/collapse icons are missing: Stepped layout must be enabled. If it is on and icons still do not show, check that the visual is wide enough; icons can be hidden if the row header column is too narrow.
  • Subtotals show the wrong values: Review the subtotal settings in the Format pane and confirm the value field aggregation (sum, average, count) is what you expect. Change it in the Values well if needed.
  • The matrix shows blank rows: This usually means the subheading field has blanks for some records. Filter them out in the Filters pane or clean the data in Power Query.
  • Formatting looks different after publishing: Refresh the browser and check the report in the Power BI Service. Some visual settings render slightly differently online; if a setting is critical, verify it in the service after publishing.
  • Cannot find a specific formatting option: Menu labels and available options can vary by Power BI Desktop version. Update to the latest version from the official Microsoft download page, and check the Format pane sections carefully.

Frequently Asked Questions

Can I create subheadings in a table visual, not just a matrix?

Not as true expandable subheadings. The table visual does not support row hierarchies with expand/collapse. Use a matrix with Stepped layout for that behavior, or style a table with header formatting as a visual workaround.

How do I add more than two levels of subheadings?

Add additional fields to the Rows well of the matrix, in the order you want them to nest. Each field becomes a deeper level in the hierarchy, and Stepped layout indents each level.

Why are my subheadings showing above the main headings?

The order of fields in the Rows well determines the hierarchy. Drag the fields so the main heading is first and the subheading is second.

Can users expand and collapse subheadings in the published report?

Yes, if Stepped layout is enabled and the report is published to Power BI Service. Readers can click the expand/collapse icons next to each heading. Behavior may vary slightly by browser.

Do I need a separate subheading column in my data?

You need a field that represents the subheading. If your data does not have one, you can create a calculated column in DAX or add a column in Power Query that combines or categorizes your existing fields.

Does Stepped layout work in Power BI Report Server?

Stepped layout is a matrix formatting option in Power BI Desktop. Availability in Report Server depends on the version; check the official documentation for your Report Server version, as features can lag behind the cloud service.