Sub topic 8
Connect each slicer to the right charts and pivot tables
This chapter assumes you have a flat source table on a Data tab, at least one pivot table, a chart built from it, and one slicer on a Dashboard tab. You should also know where the slicer's data range and column settings are. Here you decide what each slicer controls. You also learn why some objects ignore a slicer.
What a slicer is tied to
A slicer is a filter control that you place on a sheet. It stores two settings:
- Data range: the block of cells it filters, such as
Data!A1:F. - Column: the column whose values or conditions it offers, such as
Region.
The slicer does not know about "the dashboard" in general. It acts on objects that read from its data range. Your dashboard has three kinds of objects, and they behave differently:
| Object | Reads from | Reacts to a slicer when |
|---|---|---|
| Pivot table | Its source range on `Data` | The slicer is connected to it and the ranges match |
| Chart built from a pivot table | The pivot table's output | The pivot table it reads from reacts |
| Chart built directly from source rows | The source range | The slicer is connected to the chart and the ranges match |
| Formula such as `SUM`, `QUERY`, or `FILTER` | Any range you write in it | Never, unless it uses `SUBTOTAL` on filtered rows |
Keep this table in mind. Most "my slicer does nothing" problems come from an object that is in the wrong row of it.
How the connection flows
A slicer filters data in the source range. The pivot tables recalculate from the filtered rows. The charts redraw from the pivot tables.
The dotted line shows an object that reads the same data but is not connected. It keeps showing every row.
Connect a slicer to objects
Follow these steps for each slicer.
- Click the slicer on the
Dashboardtab so it is selected. - Open its More menu (the three dots in the slicer's corner).
- Choose Connect to charts. A list appears with the charts and pivot tables in the spreadsheet. Pivot tables are listed there too, even though the command name mentions only charts.
- Tick the objects this slicer should control and clear the others.
- Confirm, then click a value in the slicer and watch which objects change.
If the slicer's data range is Data!A1:F, it can only drive objects that read that same range. A pivot table built on Data!A1:F1000 and a slicer on Data!A1:F look similar but are different ranges. Check them when a connection fails.
Decide the scope on purpose
Do not connect every slicer to everything by default. Decide per slicer. A simple rule set works well:
- A global slicer, such as Region, drives every object that shows sales. Use it when every view should answer "for this region".
- A local slicer, such as Category, drives only the views where the category split makes sense. A chart that already shows revenue by category does not need it.
- A reference chart, such as a total trend line you want to compare against, stays unconnected on purpose.
Write the scope next to the slicer as a short label, for example "Region (all charts)". A viewer who clicks a slicer and sees only half the page move will otherwise think the dashboard is broken.
Pivot tables and their source range
A pivot table has its own source range. A slicer connects to the pivot table only if the two share a data range. This has some consequences.
- If two pivot tables use
Data!A1:F1000and one usesData!A1:F, one slicer cannot cover all three. Rebuild them on the same range. - Open-ended ranges such as
Data!A1:Fgrow when you add rows. Fixed ranges such asData!A1:F1000do not. Prefer open-ended ranges so new orders appear in the pivot tables and slicers without edits. - Changing a pivot table's source range after you connected a slicer can break the connection. Open the slicer's connection list again and re-tick the pivot table.
A pivot table also has its own filters. A slicer filter and a pivot table filter combine. A row appears only if it passes both. If a pivot table has its own filter Region = West and the slicer says East, the pivot table shows nothing. Remove the built-in filter when you want the slicer to be the only control.
Charts: direct and through a pivot table
There are two common ways to build a chart on a dashboard, and they react differently.
Chart built from a pivot table. The chart's range is the pivot table's output cells. You do not connect the chart to the slicer. You connect the pivot table, and the chart follows because its input changes. This is the pattern this tutorial recommends, because the pivot table gives you grouping and totals for free.
Chart built from source rows. The chart's range is on Data. You connect this chart to the slicer directly. The chart groups and totals the filtered rows by itself, which is limited. It is fine for a simple column chart of one measure by one dimension.
If you connect a chart that reads a pivot table's output, the connection list may not show an effect. The output cells are not the slicer's data range. Connect the pivot table instead.
What slicers do not control
Slicers do not change the sheet's other formulas. Compare a plain total with a visible-rows total:
Plain total (ignores slicers):
=SUM(Data!F2:F1000)
Visible-rows total (follows filtered rows):
=SUBTOTAL(109, Data!F2:F1000)SUM adds all cells in the range, including rows hidden by a filter. SUBTOTAL with code 109 skips rows hidden by filtering. The next chapters cover KPI cells in detail. For now, note that KPI cells must use SUBTOTAL to follow a slicer that filters the same data range.
A QUERY formula also reads its range directly, so it ignores a slicer. That can be useful. This formula builds a revenue-by-region summary that stays fixed:
=QUERY(Data!A1:F, "select C, sum(F) where C is not null group by C label sum(F) 'Revenue'", 1)Use a table like this beside a slicer-controlled pivot table to show the filtered view against the full picture.
Several slicers on one dashboard
You can add as many slicers as you need, and they combine. A row shows only if it passes every active slicer. With Region = East and Category = Hardware, you see East hardware orders only.
Keep these points in mind:
- Slicers on the same data range work together. Slicers on different ranges do not.
- A slicer connected to a pivot table and another connected to a different pivot table do not affect each other's objects. They only meet where both connect to the same object.
- Too many slicers make it hard to see why a number is low. Three or four are usually enough for a one-page dashboard.
A slicer filter is saved in the file. When you open the dashboard later, or someone else does, the last selection is still applied. Before you share the file, clear all slicers so viewers start from the full data.
A worked layout
Suppose the dashboard has four objects.
| Object | Reads | Connected to Region | Connected to Category |
|---|---|---|---|
| Pivot A: revenue by month | `Data!A1:F` | Yes | Yes |
| Pivot B: revenue by category | `Data!A1:F` | Yes | No |
| Chart 1 (from Pivot A) | Pivot A output | Follows Pivot A | Follows Pivot A |
| Chart 2 (from Pivot B) | Pivot B output | Follows Pivot B | Not affected |
Pivot B is not connected to Category because it already splits revenue by category. Filtering it by category would hide the bars you want to compare.
Common mistakes
- Connecting the chart but not the pivot table. The chart reads pivot output, so nothing changes. Connect the pivot table.
- Mismatched ranges. The slicer and the pivot table use different ranges. Rebuild so both use
Data!A1:F. - Hidden built-in filters. A pivot table filter conflicts with the slicer and returns an empty table.
- A KPI cell built with
SUM. It ignores the slicer. Switch toSUBTOTAL(109, ...). - Slicers left filtered. Viewers see partial data and think the totals are wrong.
Quick checklist
- Every pivot table and chart shares the slicer's data range, or reads from a pivot table that does.
- Each slicer's connection list is ticked on purpose.
- No pivot table carries a built-in filter that fights the slicer.
- KPI cells use
SUBTOTAL, notSUM. - Each slicer has a short label saying what it controls.
- All slicers are cleared before you share.
Exercise
Your dashboard has a slicer on Region. You connect it to a pivot table of revenue by month, and a line chart built from that pivot table. You also add a chart built from a QUERY formula that summarizes revenue by category. After you pick "West" in the slicer, the pivot table and line chart change, but the QUERY chart does not. Why, and what are two ways to handle it?
Show answer
The QUERY formula reads Data directly, and formulas do not react to a slicer, so its chart never sees the filtered rows. One option is to leave it unconnected on purpose and label it as the all-regions view. The other is to replace it with a pivot table of revenue by category on the same data range, connect that pivot table to the Region slicer, and build the chart from it.