Sub topic 2
What Slicers Are and Why They Help
This chapter assumes you can build a basic PivotTable and drag fields into the Rows, Columns, Values, and Filters areas. You should also know the difference between a report filter and a field drop-down filter. Nothing here requires inserting a slicer yet. The goal is a working model of what a slicer is, so the next chapters make sense.
What a slicer is
A slicer is a floating box of buttons that filters a PivotTable. It has one button for each unique item in a field. A slicer for a Region field might show buttons for East, North, South, and West. Clicking a button filters the PivotTable to that item. The button looks pressed, and the other buttons look dimmed.
A slicer does the same job as a report filter or a field drop-down. It applies a filter to one field. What changes is how you use it and how it looks.
What slicers do better
Compare a slicer with the filters you already know.
| Feature | Report filter or drop-down | Slicer |
|---|---|---|
| Shows the current filter | Only as "(Multiple Items)" or after you open the list | Always visible as highlighted buttons |
| Selecting items | Open a list, tick boxes, click OK | One click per item |
| Position | Fixed in a cell or field header | Floats anywhere on the sheet |
| Connects to several PivotTables | No | Yes, if they share a pivot cache |
| Formatting | Cell formatting only | Size, columns, and styles |
Three advantages follow from this table:
- Visible state. Anyone who opens the report can see which items are selected without opening a menu.
- Faster use. Switching from East to West is one click, not four steps.
- Shared control. One slicer can drive several PivotTables at once, which is the basis of an interactive report.
How a slicer relates to the PivotTable
A slicer is not part of the PivotTable layout. The field it filters does not need to be in the Rows, Columns, Values, or Filters area. You can filter by Region even when Region appears nowhere in the table.
Excel stores each slicer's selection in a slicer cache. The slicer cache links to a PivotTable through its pivot cache, which is the stored copy of the source data. This is why a slicer can only connect to PivotTables built from the same pivot cache. The chapter on report connections covers this in detail.
What a slicer does not do
A slicer filters by items in a field. It does not filter by value conditions such as "sales greater than 1,000". Use a value filter in the field drop-down for that. A slicer also treats dates as plain items. For a continuous date range, Excel provides a timeline, which a later chapter covers.
Common misunderstandings
- "Slicers replace report filters." They do not. A report filter takes no space on the sheet and suits fields you rarely change.
- "Clearing the slicer deletes it." Clearing the filter shows all items again. The slicer stays on the sheet.
- "Every PivotTable on the sheet responds." Only PivotTables connected to the slicer respond.
Exercise
A colleague opens your report and asks which regions the PivotTable currently shows. Why does a slicer answer this better than a field drop-down, and what shared requirement must two PivotTables meet before one slicer can filter both?
Show answer
A slicer keeps its selected buttons highlighted on the sheet, so the current filter is visible without opening a menu. A drop-down hides the selection until you open it, or shows only "(Multiple Items)". Two PivotTables must be built from the same pivot cache for one slicer to filter both.