A dynamic pie chart in Excel updates when its source data changes. For a chart that grows as you add records, format the source as an Excel Table, select its category and value columns, then choose Insert > Insert Pie or Doughnut Chart; for an interactive chart, use a PivotChart with a slicer or filter.
What makes a pie chart dynamic?
“Dynamic” can mean two different things in Excel. A chart can update automatically when the values in its source change, or it can respond to a reader’s selection, such as a department, month, or product. A standard pie chart based on a Table handles the first job well. A PivotChart with a slicer is usually the simpler choice for the second.
A pie chart represents one set of values as parts of a whole. Its usefulness depends on the categories being mutually exclusive and the values being meaningful parts of the same total. For example, a chart of expenses by category for one month can communicate the proportions clearly. A pie chart is less suitable for comparing monthly trends or dozens of product lines; a line or bar chart will usually make those comparisons easier.
Excel charts are linked to source cells. If those cells change, the chart can redraw, but a chart linked to a fixed range will not necessarily include records added beyond that range. An Excel Table provides a growing source range, which is why it is a practical starting point for a chart that should keep up with new rows.
Build a chart that expands with new rows
- Put the source data in two columns with clear headers, such as Category and Amount. Keep one record per row and avoid blank rows inside the data.
- Click a cell in the data and press Ctrl+T on Windows. Confirm the range and select My table has headers, then choose OK. On Mac, use Command+T or choose Insert > Table, depending on the Excel version.
- Click in the Table, then select the category and amount columns. If the columns are not next to each other, select the first column and hold Ctrl while selecting the second on Windows; on Mac, hold Command.
- Choose Insert > Insert Pie or Doughnut Chart and select a 2-D pie style. Excel inserts a chart linked to the selected Table fields.
- Add new records in the row immediately below the Table, or press Tab from its last cell to create a new row. The Table expands, and the chart should include the new category or updated amount.
Excel may format the Table automatically, but formatting is not required for the chart to work. The important details are that each column has a header, the category and value fields contain usable data, and new records become part of the Table. If a row is entered well away from the Table, Excel may not recognize it as an addition; check that the Table boundary expanded before assuming the chart is broken.
Use an interactive PivotChart and slicer
If viewers need to switch between groups of data, use a PivotChart rather than building a separate pie chart for every group. A PivotTable summarizes the records, and its PivotChart displays that summary. A slicer supplies clickable buttons for filtering fields such as Region or Department.
- Click a cell in the source Table and choose Insert > PivotTable. Choose where to place the PivotTable and select OK.
- In the PivotTable Fields pane, place the category field in Rows and the numeric field in Values. Confirm that Excel is summarizing the numeric field by Sum, not Count, when a sum is intended.
- Click in the PivotTable and choose PivotTable Analyze > PivotChart. Select a pie chart and confirm.
- With the PivotTable selected, choose PivotTable Analyze > Insert Slicer, select a field such as Region, and choose OK. Click a slicer button to filter the PivotTable and chart.
Menu labels can vary slightly among Microsoft 365 updates. A PivotChart reflects the PivotTable’s current summarized results, but it may not recalculate immediately when source rows change. Choose Data > Refresh All, or right-click the PivotTable and choose Refresh. A slicer is most useful when the chart should show one selected slice of the data at a time; it does not turn a pie chart into a good tool for comparing many groups simultaneously.
Create a category summary with dynamic formulas
For a more customized chart, a formula-driven summary can produce one row per category and calculate the total for each. This is useful when the source contains repeated records—for example, several transactions for the same expense type—and the chart should show category totals rather than every transaction. The following formulas use functions available in Microsoft 365 and Excel 2021 or later.
Assume the source is an Excel Table named Sales with columns Category and Amount. In a separate worksheet, enter a Category header in D1 and a Total header in E1. With the table’s category values in Sales[Category], enter this in D2:
=SORT(UNIQUE(FILTER(Sales[Category],Sales[Category]<>"")))
The formula spills a sorted list of nonblank categories below D2. With those category names in D2 and below, enter this in E2:
=SUMIF(Sales[Category],D2#,Sales[Amount])
The # refers to the full spilled list starting at D2. The formula returns one total for each category, and both formulas respond when the Table gains records. For example, if the table contains Food amounts of 40 and 20, Travel of 25, and Supplies of 15, the summary totals are Food 60, Supplies 15, and Travel 25. Those values total 100, so the pie represents 60%, 15%, and 25% respectively.
To keep a chart linked as the spill range changes size, create workbook-level names for the labels and values. Choose Formulas > Name Manager > New. Name one range PieLabels and set Refers to as =Sheet1!$D$2#; name the other PieValues and set Refers to as =Sheet1!$E$2#. Replace Sheet1 with the actual worksheet name. In the chart’s Select Data settings, use those names for the category labels and series values. This extra setup is useful when the number of categories can change; a chart created from only the currently visible cells may not automatically include categories added to a spill range.
Format the chart so it remains readable
A chart that updates correctly can still be difficult to interpret. Start with a descriptive title that states the measure and time period, such as “Expense share, April.” If the chart changes through a slicer, make the selected group clear in the title or nearby text so the reader knows what the pie represents.
- Use data labels when readers need exact values or percentages. Select the chart, choose Chart Design > Add Chart Element > Data Labels, and select a position. The options can differ by chart layout.
- Keep category names short and distinguishable. A long legend beside many small slices is hard to scan.
- Use a consistent color for a category when readers will compare filtered views. Avoid relying on color alone to communicate essential information.
- Limit the number of slices. If there are many small categories, group minor items into a clearly named Other category or choose a bar chart instead.
Percentages describe each category’s share of the displayed total, not necessarily its share of some larger business total. Filtering a PivotChart can change the denominator: the remaining categories may add up to 100% of the filtered view. That is mathematically correct, but it can surprise readers who expect the percentages to remain relative to all records.
Common problems and how to fix them
If new rows do not appear, first check whether they are inside the Table. Click in the source and confirm that the Table range includes the added records. Also check that the chart uses the Table fields or the intended summary, rather than a fixed cell range that stops above the new rows.
If the chart shows counts instead of totals, inspect the PivotTable’s Values field. Excel may choose Count when values are stored as text or contain inconsistent data. Correct the source values, then change the value-field setting to Sum if that option is available and appropriate. Text that looks like a number is not always treated as a number by Excel.
If a slice is missing, look for blank category names, zero or negative values, text in the amount column, or a filter that excludes the record. Pie charts are intended for nonnegative parts of a whole; negative values do not have a straightforward share-of-total interpretation. If the total is zero, or if the categories do not make up a meaningful whole, use another chart type.
For a PivotChart that seems out of date, refresh its PivotTable. For a formula summary that returns a spill error, check whether cells below or beside the formula are occupied; Excel needs empty cells for the results. Also confirm that the formulas use the actual Table and column names. These checks distinguish a chart display issue from a problem in its source data.
Table chart, PivotChart, or another option?
Choose a standard Table-based chart when the goal is to show the current share of categories and the source simply grows over time. It is quick to create, updates as the Table changes, and does not require a refresh step for ordinary source edits. It is not, by itself, a convenient interface for selecting a region or date range.
Choose a PivotChart with a slicer when people need to filter or explore a summary. It offers a clear interactive control and works well with larger record lists, but the PivotTable may need refreshing after source changes. Use a formula-driven summary when you want precise control over grouping or calculations and are comfortable maintaining the helper area and chart references.
If the real question is how categories compare, rather than what share each contributes, use a bar or column chart. People generally compare lengths more accurately than angles, and bars remain legible with more categories. A line chart is usually a better fit for a value changing over time. Selecting the chart type to match the question is more important than making the pie chart dynamic.
Excel for Mac and the web
In Microsoft 365 for Windows, the steps above use the desktop ribbon. Excel for Mac has similar Table, chart, PivotTable, and slicer features, though some ribbon labels and shortcuts differ; Command generally replaces Ctrl for the Table shortcut and multi-selecting columns. Excel for the web supports Tables and standard charts, but some PivotTable, PivotChart, and slicer controls may be limited or arranged differently from the Windows desktop app. If a specific PivotChart or slicer command is unavailable in the web interface, open the workbook in desktop Excel.
Frequently Asked Questions
Will an Excel pie chart update when I add a row?
Usually, if the chart uses an Excel Table and you add the record as part of that Table. A chart linked to a fixed cell range may not include rows added outside the range, so check the chart’s source if it does not expand.
How do I make a pie chart change with a dropdown?
A PivotChart with a slicer is a straightforward built-in approach: insert a PivotTable and PivotChart, then add a slicer for the field you want to choose. A normal pie chart does not automatically gain interactive filtering just because its source is a Table.
Can a pie chart show percentages automatically?
Yes. Select the chart and add data labels, then use the label formatting options to display percentages. Check whether the labels show the category name, value, or percentage, and avoid showing so many details that the slices become cluttered.
Why does my pie chart show 100% after I filter it?
Pie percentages are calculated from the values currently displayed. If a filter removes categories, the remaining categories can add up to 100% of the filtered total rather than 100% of the original dataset.
Is a pie chart suitable for many categories?
Not usually. Numerous small slices and similar angles are difficult to compare. Consider grouping minor categories when that is meaningful, or use a sorted bar chart to make comparisons clearer.
Related
- Conditional Formatting: Apply Rules to Entire Rows
- Can You Do Text to Columns Vertically in Excel?
- Conditional Formatting a Row Based on a Cell
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Add a Trendline to an Excel Bar Chart? Here’s How It WorksYes—Excel for Microsoft 365 on Windows can add a trendline to a supported 2-D bar chart. Select the…
- Excel Line Chart: Change Color Partway Through a LineTo change a line chart’s color partway through in Excel for Microsoft 365 on Windows, split the plotted…
- Excel Chart Dates Not Matching Data? Fix the AxisIf Excel chart dates do not line up with the source data, first check whether the date cells…
- Balance Chart in Excel: Track an Account Over TimeTo create a balance chart in Excel, list transaction dates and signed amounts, calculate a running balance beside…
- Excel Chart Timeline: Create and Format OneIn Excel for Microsoft 365 on Windows, add a timeline that filters a chart by selecting its PivotTable…
- Add a Zero Line to an Excel Chart: Methods and TipsTo add a zero line to an Excel chart, either make the value axis cross at 0 or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.