Excel course · Lesson 15 of 34

PivotCharts, slicers and timelines

Turn PivotTables into interactive reports: create PivotCharts, add slicers and timelines, connect one slicer to several PivotTables, and format them.

Intermediate 15 min read

A PivotTable answers questions; a PivotChart makes the answer visible; slicers and timelines let anyone ask new questions by clicking a button. Together they are the core of an interactive Excel report, without a single line of code. This lesson builds on PivotTables: summarise thousands of rows in seconds and prepares the ground for the Project: build a sales dashboard from scratch.

Creating a PivotChart

ABCD
1DateRegionProductAmount
22026-01-12NorthLaptop1900
32026-01-20SouthMonitor945
42026-02-03EastLaptop2850
52026-02-17NorthMouse240
62026-03-05SouthLaptop950
72026-03-22EastMonitor378

A sales table named Sales, used for the PivotTable behind the chart.

  1. Click inside an existing PivotTable, for example one with Region in Rows and Sum of Amount in Values.
  2. Choose PivotTable Analyze › Tools › PivotChart (Windows) or Insert › PivotChart on Mac.
  3. Pick Clustered Column and click OK.
  4. The chart appears with grey field buttons on it. These let readers filter and sort directly on the chart.
  5. To create the PivotTable and chart in one go from raw data, click in the data and choose Insert › Charts › PivotChart › PivotChart & PivotTable.

A PivotChart is always linked to one PivotTable. Filter the table and the chart follows; change the chart's fields and the table changes too. With the data above the chart shows East 3,228, North 2,140 and South 1,895.

Tip. Field buttons clutter a finished report. Hide them with PivotChart Analyze › Show/Hide › Field Buttons (Windows), or right-click a button and choose Hide All Field Buttons on Chart.

PivotChart limitations

  • Scatter, bubble and stock charts are not available as PivotCharts.
  • The chart always shows the whole PivotTable; you cannot pick only some rows except by filtering the table.
  • Formatting may change after refresh if the number of series changes. Set formatting after the layout is final, and check PivotTable Analyze › Options › Layout & Format › Preserve cell formatting on update for the table.

Slicers

A slicer is a panel of buttons, one per item in a field. Click North and every connected PivotTable and PivotChart shows only North. Slicers are friendlier than filter drop-downs and they show clearly which filter is active.

  1. Click inside the PivotTable.
  2. Choose PivotTable Analyze › Filter › Insert Slicer.
  3. Tick Region (and Product if you want a second slicer) and click OK.
  4. Click a button to filter. Hold Ctrl (Mac: Cmd) to select several, or click the Multi-Select icon at the top of the slicer.
  5. Click the Clear Filter icon (funnel with a red cross) or press Alt+C while the slicer is selected to show everything again.

Formatting slicers

  • Select the slicer and use the Slicer tab (Options in older versions) to pick a style.
  • Slicer › Buttons › Columns: set to 3 or 4 to lay buttons out horizontally, which fits nicely above a chart.
  • Slicer Settings: change the caption, sort order, and tick Hide items with no data so impossible choices disappear.
  • Right-click › Size and Properties › Don't move or size with cells keeps slicers in place when columns are resized.

One slicer, many reports

A dashboard often has several PivotTables: sales by region, sales by product, a monthly trend. One slicer should filter them all.

  1. Make sure all PivotTables come from the same source (the same table or the same Data Model). PivotTables built from the same table share a cache automatically.
  2. Select the slicer and choose Slicer › Slicer › Report Connections (right-click the slicer › Report Connections also works).
  3. Tick every PivotTable that should respond. Give PivotTables meaningful names first (PivotTable Analyze › PivotTable Name), so this list is readable.
  4. Click OK. Clicking East now filters all ticked PivotTables and their charts together.
Watch out. If a PivotTable does not appear in Report Connections, it was built from a different source or a separate cache, for example a copy of the data range. Rebuild it from the same table, or copy an existing PivotTable and change its fields.

Timelines: slicers for dates

A timeline is a slicer designed for dates. Drag across months to pick a period; switch between Years, Quarters, Months and Days with the drop-down in its corner.

  1. Click inside a PivotTable whose source has a real date column.
  2. Choose PivotTable Analyze › Filter › Insert Timeline, tick Date and click OK.
  3. Click FEB to see February only (3,090 in the example), or drag from JAN to FEB for the first two months.
  4. Use Timeline › Report Connections to connect it to other PivotTables, exactly like a slicer.
Note. Timelines arrived in Excel 2013 for Windows and are available in current Excel for Mac and Microsoft 365. The date column must contain true dates, not text; check with a quick =ISNUMBER(A2).

Slicers on tables and formulas

Slicers also work on plain Excel tables (Table Design › Tools › Insert Slicer). They filter the table rows, and since SUBTOTAL and AGGREGATE ignore hidden rows, totals calculated with them respond to the slicer. With PivotTables, you can read the current slicer result into a normal cell with GETPIVOTDATA, which is how many dashboards put big headline numbers next to the charts.

Putting it together: a mini report

  1. Create three PivotTables from the Sales table on a sheet called Calc: Amount by Region, Amount by Product, Amount by Month.
  2. Create a PivotChart from each: a column chart for regions, a bar chart for products, a line chart for months.
  3. Cut the three charts and paste them on a sheet called Report.
  4. Insert a Region slicer and a Date timeline on Report and connect both to all three PivotTables.
  5. Hide field buttons, turn off gridlines (View › Show › Gridlines), and align everything with Shape Format › Arrange › Align.
  6. Change the source data, then press Data › Refresh All: every chart updates.

Check yourself

1. What is a PivotChart always linked to?

2. How do you make one slicer control three PivotTables?

3. A PivotTable is missing from Report Connections. Why?

4. Which tool is designed for filtering by date periods?

5. Which chart type cannot be a PivotChart?