Sub topic 13
Charts and Slicers for Pivot Tables
This chapter assumes that you have a working pivot table and know how to select ranges, insert a chart, and edit basic chart settings. You will learn how to turn a pivot result into a readable chart and add a slicer that lets viewers filter the summary interactively.
Turn a pivot table into a chart
A pivot table is useful for exact totals. A chart makes patterns easier to see. For example, a pivot table can summarize revenue by region and month. A column chart can then compare regions, while a line chart can show how revenue changes over time.
To create a chart from a pivot table:
- Select the pivot table, including its row and column labels. Avoid selecting unrelated cells.
- Choose Insert > Chart.
- In the Chart editor, check the Data range. The first row and first column should normally provide labels.
- Choose a chart type that matches the question.
- Use Setup and Customize to adjust series, titles, colors, and legends.
| Question | Useful chart |
|---|---|
| Which regions have the highest totals? | Column chart |
| How does a measure change by month? | Line chart |
| What share does each category contribute? | Pie chart, for a small number of categories |
A chart based on a pivot table reflects the pivot table's current layout. If you move a field from Rows to Columns, the chart may change its series and categories. Check the chart after changing the pivot configuration.
Add a slicer
A slicer is an on-sheet control for filtering a dataset. It displays a selected field, such as Region or Product, and lets a viewer choose which items to include.
To add one:
- Select a cell in the source data or select the pivot table.
- Choose Data > Add a slicer.
- In the slicer settings, choose the column to filter.
- Select values from the slicer's filter menu.
- Move the slicer beside the pivot table or chart.
A slicer can filter a pivot table and charts that use the same source data. For example, a Region slicer can show only West and Central results. The pivot table recalculates, and a chart based on that pivot displays the filtered results.
A slicer filter is separate from the pivot table's Filters section. Use the pivot editor when you are defining the report's default logic. Use a slicer when viewers need to change the view without editing the pivot table.
Avoid misleading charts
A chart can hide problems in the underlying summary. Before sharing it, check these points:
- Confirm that the chart includes the correct labels and value columns.
- Remove grand totals from a chart when they duplicate the series or distort the scale.
- Use a line chart only when the horizontal axis has a meaningful order, such as dates.
- Avoid pie charts with many categories or nearly equal values.
- Test every slicer choice, including selecting all values and selecting no values.
- Make the chart title describe the measure and filter context.
A common error is placing a slicer on a different source range from the chart or pivot table. The slicer may then have no effect on that object. Another error is filtering the source data manually and assuming that every formula or chart will use the same filter. Slicers affect connected objects, not every object on the spreadsheet.
Exercise
You have a pivot table with Revenue by Region and a column chart based on it. How would you let a viewer display only West revenue without editing the pivot table?
Show answer
Add a slicer, set its column to Region, and select West. Confirm that the chart and pivot table use the same source data so both respond to the slicer.