MSBA-175 · Lesson 10 of 12 · 20 min
PivotTables and PivotCharts
▶ Video coming soon A video version of this lesson is on the way.
PivotTables were covered at the Associate level in MSBA-171, and MO-211 builds on them. The objective manage and format PivotTables covers creating PivotTables, modifying field selections and options, creating slicers, grouping data, adding calculated fields and formatting data. The objective manage and format PivotCharts covers creating PivotCharts, manipulating options in existing PivotCharts, applying styles and drilling down into details. Together they are one of the largest groups of tasks on the exam. Dagny's source this week was the Maple & Pine bookings table for 2025 and 2026: one row per booked service, with columns for Date, Package, Client, EventType, Service, Coordinator, Guests, Fee and Cost.
Preparing the source
A PivotTable summarizes a list, so the list must be clean: one header row with a unique name in every column, no blank rows or columns inside the data, one kind of value per column, and no subtotal rows. The easiest way to meet these rules is to format the range as an Excel table (Insert > Table or Ctrl+T) and give it a name, here Bookings. A PivotTable based on a table picks up new rows automatically when it is refreshed; a PivotTable based on a fixed range does not, and its source must be changed with PivotTable Analyze > Change Data Source.
Creating a PivotTable
Select a cell in the table and choose Insert > PivotTable. The dialog confirms the source (the table name) and asks where to put the PivotTable: a New Worksheet or an Existing Worksheet at a cell you choose. The Recommended PivotTables button shows a few ready-made layouts, which are a quick start but rarely exactly what a task asks for. On the new sheet, the PivotTable Fields pane lists the source columns, and four areas below them define the layout.
| Area | What it does | Maple & Pine example |
|---|---|---|
| Filters | Filters the whole PivotTable by one or more fields | Package |
| Columns | Creates a column for each item | EventType |
| Rows | Creates a row for each item | Coordinator |
| Values | Summarizes a numeric field | Sum of Fee |
Dragging a field between areas, or within an area to change its order, rebuilds the PivotTable instantly. A field placed twice in Rows creates an outline: Package then Coordinator, for example, lists coordinators under each package. To remove a field, drag it out of its area or clear its box in the field list. The Defer Layout Update check box at the bottom of the pane delays the rebuild until you click Update, which helps with large sources.
Value field settings
A numeric field in Values is summed by default, and a text field is counted. To change this, click the field in the Values area and choose Value Field Settings. The Summarize Values By tab offers Sum, Count, Average, Max, Min, Product and several statistical functions. The Show Values As tab changes how the result is expressed without changing the summary.
| Show Values As | Result | Use |
|---|---|---|
| % of Grand Total | Each cell as a share of the overall total | Share of fees by coordinator and event type |
| % of Column Total | Each cell as a share of its column | Mix of coordinators within each event type |
| % of Row Total | Each cell as a share of its row | Mix of event types for each coordinator |
| Difference From | Each cell minus a base item | Change from the previous year |
| Running Total In | A cumulative total along a field | Fees to date by month |
| Rank Largest to Smallest | The rank of each item | Coordinator ranking |
The same field can appear in Values more than once with different settings. Dagny added Fee twice, once as Sum and once as % of Column Total, and renamed them in the Custom Name box to "Fees" and "Share of event type". Custom names cannot be the same as a source field name; "Fee" is already taken, which is why "Fees" works and "Fee" does not. The Number Format button in the same dialog sets the format for the whole field, which survives refreshes in a way that formatting cells directly does not.
Field selections and options
Each row or column field has its own settings, reached by clicking the field in its area and choosing Field Settings. The Subtotals & Filters tab sets whether the field shows subtotals and which function they use. The Layout & Print tab controls whether items are shown in outline or tabular form, whether item labels repeat, whether a blank line follows each item, and whether items with no data are shown.
Layout for the whole PivotTable is on the Design tab. Subtotals shows them at the top or bottom of each group or hides them. Grand Totals turns them on or off for rows and columns separately. Report Layout chooses Compact, Outline or Tabular form and whether to repeat item labels. Tabular form with repeated labels produces a flat table that is easy to copy elsewhere; compact form is the most readable on screen. Blank Rows inserts a space after each group.
More options are in PivotTable Analyze > PivotTable > Options. The ones most often needed are For empty cells show, which displays a zero or dash instead of a blank; Autofit column widths on update, which many people turn off so their widths stay put; Show grand totals on the Totals & Filters tab; and Refresh data when opening the file on the Data tab. The PivotTable name, which matters for formulas and slicer connections, is in the box at the far left of the PivotTable Analyze tab.
Slicers and timelines
A slicer is an on-sheet set of buttons that filters one or more PivotTables. Select a cell in the PivotTable and choose PivotTable Analyze > Insert Slicer, then tick the fields. Dagny added slicers for Package and EventType. Clicking a button filters to that item; Ctrl-click or the Multi-Select button selects several; the Clear Filter button in the slicer's corner removes the filter.
A slicer can control several PivotTables if they share the same source. Select the slicer, choose Slicer > Report Connections, and tick each PivotTable to connect. The Slicer tab also sets the slicer's caption, style, size and number of button columns, and Slicer Settings can hide items with no data. A timeline is a special slicer for a date field (PivotTable Analyze > Insert Timeline); it filters by years, quarters, months or days with a sliding bar, which is ideal for a bookings report.
Grouping
Grouping combines items in a row or column field into larger units. For dates, Excel groups automatically when a date field is added to Rows or Columns, creating Years, Quarters and Months fields; to change this, right-click a date and choose Group, then select the units. For numbers, right-click a value in the field and choose Group, then set Starting at, Ending at and By. Dagny grouped Guests by 50, starting at 0 and ending at 299, to show fees by event size.
Worked problem
Grouping text items
The EventType field has eight items, but Rosalind wants just two groups: weddings (Wedding, Elopement, Vow renewal) and corporate (Conference, Retreat, Gala, Launch, Awards).
Show solution
- In the PivotTable, select the three wedding-related items with Ctrl-click.
- Right-click and choose Group. Excel creates a group named Group1 and a new field named EventType2.
- Select the other five items and group them as Group2.
- Type over Group1 and Group2 to rename them Weddings and Corporate, and rename EventType2 in Field Settings to Category.
Answer: The PivotTable now has a Category field with two items, each expandable to its original event types.
To remove a group, select it and choose Ungroup. Grouping affects every PivotTable that shares the same cache, which is usually every PivotTable built from the same source in the workbook. If one PivotTable needs groups and another does not, a helper column in the source table is a cleaner solution.
Calculated fields
A calculated field adds a new field to the PivotTable using a formula based on other fields. Choose PivotTable Analyze > Fields, Items & Sets > Calculated Field, type a Name, and build the Formula by double-clicking fields in the list. Dagny created a field named Margin with the formula =Fee-Cost, and another named MarginPct with =(Fee-Cost)/Fee.
Calculated fields work on the sums of their inputs for each cell of the PivotTable, not on each source row. That is exactly right for MarginPct: it divides total margin by total fee for each coordinator, which is the true margin percentage. It is wrong for something like =Guests*0.5, if the intent is a per-row calculation that should then be averaged. When the calculation must happen row by row, add a column to the source table instead.
Calculated fields appear at the bottom of the field list and can be modified or deleted in the same dialog by choosing them from the Name drop-down. A calculated item, created from the same menu, adds an item within a field instead, such as a combined item for two packages; it is rarely needed and can make totals misleading.
Refreshing and the PivotTable cache
A PivotTable does not read its source continuously. It keeps a copy of the data, called the PivotTable cache, and only reads the source again when you refresh. Changing a fee in the Bookings table therefore leaves the PivotTable showing the old total until you choose PivotTable Analyze > Refresh (Alt+F5) or Refresh All (Ctrl+Alt+F5), which refreshes every PivotTable and query in the workbook. If many PivotTables come from the same source, Excel shares one cache among them, which keeps the file smaller and explains why grouping one PivotTable groups the others.
Refreshing can change column widths and, if the source changed shape, remove fields that no longer exist. Turning off Autofit column widths on update and keeping source column names stable avoids most surprises. If a refresh says the PivotTable would overlap another, there is not enough empty space below or beside it; move one of them with PivotTable Analyze > Move PivotTable.
What the exam asks
PivotTable tasks on MO-211 are specific about names and settings. A task might ask you to add a field to a particular area, show values as a percentage of the row total, rename a value field, insert a slicer and connect it to a second PivotTable, group dates by quarters and years, or add a calculated field with a given name and formula. Check each requirement against the Fields pane before moving on: the right field in the right area, the right summary function, the exact custom name. PivotChart tasks usually ask for a chart type, a style or colour scheme, hidden field buttons, or an expanded level. Because PivotCharts follow their PivotTables, changing the wrong one can undo an earlier task, so finish the PivotTable tasks first.
Formatting data
Formatting a PivotTable starts with PivotTable Styles on the Design tab and the PivotTable Style Options check boxes: Row Headers, Column Headers, Banded Rows and Banded Columns. Numbers should be formatted through Value Field Settings > Number Format, as above. Conditional formatting applied to a PivotTable offers a choice in the Apply formatting rule to section of the rule: selected cells, all cells showing the value field, or all cells showing that field for particular row and column items. The last two keep the rule correct when the PivotTable changes shape.
PivotCharts
A PivotChart is a chart linked to a PivotTable. Select a cell in a PivotTable and choose PivotTable Analyze > PivotChart, or create both at once with Insert > PivotChart from the source. The chart's categories and series come from the PivotTable's rows and columns, and the chart includes field buttons that filter it from the chart itself. Changing the PivotTable changes the chart, and the reverse is also true.
| Task | Where |
|---|---|
| Change the chart type | Design > Change Chart Type |
| Hide field buttons | PivotChart Analyze > Field Buttons |
| Add or format chart elements | Design > Add Chart Element, or the + button |
| Apply a chart style or colour scheme | Design > Chart Styles and Change Colors |
| Move the chart to its own sheet | Design > Move Chart |
| Filter the chart | Field buttons, slicers or the PivotTable filters |
Some chart types cannot be PivotCharts: scatter, bubble, stock, and the newer types such as histogram, box and whisker, funnel, sunburst, treemap and waterfall. Lesson 11 covers those with ordinary ranges.
Drilling down shows the detail behind a summary. In a PivotTable, double-click a value cell, and Excel creates a new sheet listing the source rows behind that number, an action called Show Details. In a PivotChart with a date or grouped field, the Expand Entire Field and Collapse Entire Field buttons in the bottom right of the chart (or on PivotChart Analyze) move between levels, such as from years to quarters to months. Dagny drilled down from 2026 into its quarters to show Rosalind where the autumn peak came from.
Common mistakes
MistakeBasing a PivotTable on a fixed range that grows.
InsteadUse an Excel table so refreshes include new rows.
MistakeFormatting PivotTable numbers by selecting cells.
InsteadUse Value Field Settings > Number Format.
MistakeUsing a calculated field for a row-by-row calculation.
InsteadAdd a column to the source; calculated fields use summed values.
MistakeExpecting a slicer to filter a second PivotTable automatically.
InsteadConnect it with Report Connections.
MistakeTrying to make a histogram or waterfall PivotChart.
InsteadThose types are not available for PivotCharts.
Summary and key terms
- Build PivotTables from a named Excel table so refreshes include new rows.
- Value Field Settings controls the summary function, Show Values As, custom names and number formats.
- Slicers and timelines filter PivotTables; Report Connections links one slicer to several.
- Grouping combines dates, numbers or selected text items; calculated fields work on summed values.
- PivotCharts follow their PivotTables, support styles and field buttons, and can drill down by expanding fields.
- PivotTable
- An interactive summary of a list, arranged by fields in Rows, Columns, Values and Filters.
- Slicer
- A set of buttons that filters one or more PivotTables.
- Timeline
- A slicer for a date field that filters by period.
- Calculated field
- A PivotTable field defined by a formula using other fields.
- PivotChart
- A chart linked to a PivotTable.
- Show Details
- The drill-down action that lists the source rows behind a value.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Which tab of Value Field Settings shows a value as a share of its column?
Show answer
Show Values As.
How do you make one slicer filter two PivotTables?
Show answer
Slicer > Report Connections, then tick both.
What happens when you double-click a value in a PivotTable?
Show answer
A new sheet lists the source rows behind it.
Name one chart type that cannot be a PivotChart.
Show answer
For example, scatter, histogram or waterfall.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.