Excel Treemap Chart from a Pivot Table: What Works

Charts & pivot tables · Updated November 19, 2026

You can make a treemap from PivotTable results in Excel, but Excel does not offer Treemap as a PivotChart type. The reliable approach is to arrange the PivotTable’s summary data as a flat hierarchy, then insert a regular treemap chart from that range; plan for its source range to need attention if the PivotTable changes size.

Why a treemap is different from a PivotChart

A PivotChart is designed to stay connected to a PivotTable, so filtering and refreshing the table can update the chart. However, Excel’s Treemap chart is a hierarchy chart, not a supported PivotChart type. That distinction matters: choosing Treemap from the regular chart commands creates a standard chart based on cells, rather than a chart that has the full PivotChart connection to PivotTable fields and filters.

A treemap represents nested categories as rectangles. Each rectangle’s area corresponds to a value, and smaller rectangles sit inside larger rectangles to show the category structure. For example, a company could show total sales by region, then product category, then product. A column chart can compare values, but a treemap is useful when you want to see both the relative size of groups and their composition.

You may be able to select cells in a PivotTable and insert a treemap directly. Even if Excel creates a chart, treat it as a regular chart tied to the selected cell range, not as a PivotChart. A separate staging range is usually clearer and more dependable, especially when the PivotTable’s row count or layout may change after a refresh.

Arrange the data as a hierarchy

Treemaps work best when each source row describes one leaf item in the hierarchy and includes its parent categories and a numeric value. A compact example might have columns for Region, Category, Product, and Sales. The source rows could include North, Furniture, Desk, 1,200 and North, Furniture, Chair, 800. Excel can then group the product rectangles under Furniture and the Furniture rectangle under North.

Use a consistent level of detail: each row should represent one product, account, or other lowest-level item, rather than mixing detailed rows with category totals. If you include a subtotal for Furniture as well as its Desk and Chair detail, the chart may count the same sales twice. Make sure category names are present on every row. Blank parent cells can make the hierarchy unclear or lead to an unexpected grouping.

  • Put hierarchy fields in order, from broadest group to most detailed item.
  • Place the measure, such as sales or units, in the final column.
  • Use numeric values, consistent category names, and one row per leaf item.
  • Exclude grand totals, subtotals, blank rows, and explanatory text from the chart source.

Treemaps communicate parts of a whole, so use a measure that makes sense to compare as a nonnegative size. A negative sales adjustment cannot sensibly have a negative rectangle area. Investigate negative values and decide how to handle them before charting; do not silently turn them into positive values. A zero value has no visible area, even if its category remains in the source.

Build the PivotTable summary

In Excel for Microsoft 365 on Windows, create or select the PivotTable, then place the hierarchy fields in the Rows area in order and the measure in Values. For the example, put Region, Category, and Product in Rows, and Sales in Values. Confirm the value field is summarized in the intended way, such as Sum of Sales rather than Count of Sales. Right-click a value and choose Value Field Settings if you need to check or change the summary calculation.

For a more usable source range, select the PivotTable and use PivotTable Design > Report Layout > Show in Tabular Form. You can also choose PivotTable Design > Report Layout > Repeat All Item Labels so parent labels appear on each detail row. Consider PivotTable Design > Subtotals > Do Not Show Subtotals and PivotTable Design > Grand Totals > Off. These choices make it easier to identify the leaf rows without accidentally charting totals as additional items.

PivotTable layouts and the names shown in the ribbon can vary slightly with the selected cell and Excel build. If you do not see PivotTable Design, click inside the PivotTable first. The important goal is not a particular visual style; it is a clean range with one row per lowest-level item, all hierarchy labels filled in, and no total rows mixed into the values.

Create a standard treemap from the results

  1. Set up the PivotTable as described above, or create a clean staging range beside it with the hierarchy columns and values.
  2. Select the full source range, including its column headings and detail rows, but excluding totals and blank rows.
  3. On the Windows ribbon, choose Insert > Insert Hierarchy Chart > Treemap.
  4. Review the grouping and labels. If the chart is difficult to read, adjust the source hierarchy or simplify the number of categories.
  5. Use Chart Design and Format to add a chart title, change the style, or adjust available label and color options.

The result is a regular Treemap chart, not a PivotChart. Filtering the PivotTable does not necessarily filter this chart using PivotChart controls. Its display follows the cells in its chart source range. If you filter the PivotTable, check whether the intended rows are still in that range and whether hidden rows are being plotted as you expect. Excel’s chart settings can control whether data in hidden rows and columns is shown, but a standard chart does not acquire PivotChart field buttons merely because its source cells came from a PivotTable.

Choose a stable way to feed the chart

There are several practical ways to maintain the data behind a treemap. The right choice depends on whether the PivotTable’s shape is stable and how often the report changes.

  • Chart a fixed PivotTable range: This is quick when the number of categories rarely changes. Refresh the PivotTable and check the chart after each refresh, particularly if new items may add rows.
  • Use a staging range: Copy or link the desired hierarchy and values into a separate, clean block. This keeps chart input separate from PivotTable formatting, but linked cells or pasted values still need a deliberate refresh process.
  • Build a regular summary table: A normal Excel Table or a prepared data range can provide a more predictable chart source than a PivotTable layout. This is useful when you need consistent categories and want to control the displayed rows.
  • Use a manual snapshot: Copy the summarized detail and paste values into a reporting area. This is simple for a one-time presentation, but it will not update when the underlying data changes.

Do not assume a normal chart range automatically expands to include every new PivotTable row. A refresh might add products or categories beyond the cells originally selected. Conversely, a fixed chart range can include blank cells or miss new rows. After a refresh, verify the plotted categories and, if needed, update the chart’s data source through Chart Design > Select Data.

Make the chart readable and useful

Treemaps work best when the hierarchy has a clear meaning and the largest groups are worth comparing. If a chart contains hundreds of tiny product rectangles, most labels will be too small to read. Group minor items into an “Other” category in the source summary if that is appropriate for the analysis, or chart one level higher, such as category rather than individual product. Keep the detailed PivotTable available for readers who need exact figures.

Color can distinguish groups, but it should not be the only way to communicate a critical distinction. Use a clear chart title and, where the label options allow, show category names or values that help readers interpret the rectangles. The exact label controls depend on the chart and Excel version. Avoid treating area as a precise way to compare close values: treemaps are generally better at showing broad differences and composition than small numerical gaps.

Check the chart against the PivotTable before sharing it. Confirm that the measure is the intended one, the hierarchy is in the intended order, totals are not duplicated, and filters have not left out categories unexpectedly. If the report is printed or viewed at a small size, test whether the most important labels remain legible.

Common problems and what to check

  • The Treemap command is unavailable: Make sure you are using an Excel version with hierarchy charts and have selected a normal rectangular range with headings and data. If the active selection is inside a PivotTable, use a staging range and insert a regular chart from that range.
  • The rectangles do not follow the expected groups: Check the order of hierarchy columns, repeated parent labels, blank cells, and inconsistent spelling. “Office” and “Office ” with a trailing space may be treated as different labels.
  • The chart looks too large or has a duplicate category: Look for grand totals and subtotals in the selected data. Remove them from the chart source; a total alongside its component rows can double-count the displayed measure.
  • New categories are missing after refresh: The standard chart may still point to its original cell range. Use Chart Design > Select Data to inspect or change the range, then check the chart again after future refreshes.
  • Labels are crowded or missing: Reduce the number of leaf items, chart a higher level, or increase the chart’s display area. Tiny rectangles cannot reliably display long labels.

Excel for Mac also includes hierarchy chart options in supported desktop versions, though ribbon arrangement and labels can differ from Windows. Excel for the web may have different chart-creation and formatting options depending on the available build. If a command is missing in your version, prepare the hierarchy data in a worksheet and use a supported desktop version of Excel to create or adjust the treemap.

Treemap versus other ways to chart PivotTable data

A treemap is a good fit when the question is “Which groups account for the largest share, and what is inside each group?” A bar chart is usually easier when the main task is ranking values precisely, comparing close amounts, or displaying many category names. A stacked bar chart can show composition while preserving a common scale, although it may be less compact when there are many groups.

If PivotChart interactivity is essential, choose a chart type Excel supports as a PivotChart, such as a bar or column chart, and use the PivotChart’s field controls and filters. You can also keep a PivotChart for interactive exploration and a separate treemap for a static overview. They answer related but different questions; the treemap should not be presented as though it inherits PivotChart behavior.

Frequently Asked Questions

Can Excel make a treemap directly from a PivotTable?

You can use PivotTable result cells as the source for a regular treemap chart, but Excel does not provide Treemap as a PivotChart type. A clean staging range is often the safer option because it separates the chart’s data layout from the PivotTable’s changing layout.

Will a treemap update when I refresh the PivotTable?

It can reflect changes in cells included in its chart source, but it does not behave like a PivotChart with PivotTable field controls. If a refresh adds rows or changes the range, inspect the chart’s source and update it if necessary.

How should I lay out PivotTable fields for a treemap?

Put each hierarchy level in its own column, from parent to child, and put the numeric measure in the last column. Use one row per leaf item, repeat parent labels where needed, and exclude subtotals and grand totals from the chart source.

Why does my treemap show unexpected totals?

The selected range may include PivotTable subtotals or a grand total along with the detailed rows. Remove those total rows from the source, because including a parent total and its child values can represent the same amount more than once.

Can I filter a treemap with PivotTable slicers?

A regular treemap chart does not automatically gain PivotChart connections or field buttons. A slicer may filter its associated PivotTable, but do not assume the treemap will respond as a PivotChart would; verify the chart’s behavior or use a supported PivotChart type when linked filtering is required.

Bottom line

Excel can display PivotTable results in a treemap, but the chart itself is a standard chart rather than a PivotChart. Arrange the data as a clean hierarchy, remove totals, create the chart with Insert > Insert Hierarchy Chart > Treemap, and check the source range after refreshing. For dashboards that depend on PivotTable filters, pair the treemap with a supported PivotChart or choose a chart type that preserves PivotChart interactivity.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.