Sub topic 4
Selecting Items and Clearing the Filter
This chapter covers how a slicer's buttons filter a PivotTable, how single and multiple selection work, and how to clear a filter. It assumes you can already create a PivotTable, drag fields into the Rows, Columns, Values, and Filters areas, and insert a slicer from the Insert tab or the PivotTable Analyze tab. The previous chapter showed how to insert a slicer. Here you learn to use it.
How a slicer button maps to a filter
A slicer shows one button for each unique item in its field. For a Region field, you might see East, North, South, and West. Each button is either selected or not selected, and the PivotTable shows only the data for the selected items.
Excel gives the buttons two visual states that you can tell apart at a glance:
- A selected button uses the slicer style's highlight color, and the PivotTable includes that item.
- An unselected button is gray or white. The PivotTable excludes that item.
When you first insert a slicer, every button is selected. That means no filtering is applied yet. The slicer filters only after you change the selection.
A slicer filters the same way a field's drop-down filter does. It sets which items of that field are visible. The difference is that the state is always on screen, so anyone reading the report can see what is filtered without opening a menu.
Selecting a single item
Click one button to show only that item.
- Click the East button on the Region slicer.
- East turns highlighted and the other buttons turn gray.
- The PivotTable shrinks to show only East data, and grand totals recalculate for East alone.
This is the most common use. The click replaces the previous selection, so it works as "show me just this one."
Selecting multiple items
You have three ways to select more than one item.
| Method | How | Result |
|---|---|---|
| Ctrl+click | Hold Ctrl and click each button | Adds or removes that single item from the selection |
| Shift+click | Click one button, then hold Shift and click another | Selects every button between the two, inclusive |
| Multi-Select toggle | Click the multi-select icon in the slicer's top-right corner, then click buttons | Each click adds or removes an item, with no key held |
| Drag | Click and drag across several buttons | Selects the range you drag over |
The Multi-Select toggle is the one to use on a touch screen, where there is no Ctrl key. It stays on until you click it again or clear the slicer.
Ctrl+click also works to deselect. If East, North, and South are selected, Ctrl+click on North leaves East and South.
What the selected items do to the PivotTable
Selecting items does not change which fields are in the PivotTable. It only hides rows and columns whose item in the slicer's field is not selected. Three consequences are worth knowing:
- Totals reflect the selection. Grand totals and subtotals count only the visible items. A grand total of 1.2 million with all regions selected becomes the East total when you select East.
- The slicer field does not need to be in the layout. You can slice by Region even if Region is not in Rows, Columns, or Filters. The data is still filtered. This is a common source of confusion when a total changes and no visible field explains why, so the slicer must stay visible near the table.
- Filters combine with AND across fields. If one slicer selects East and a second slicer selects 2025, the PivotTable shows only East data for 2025. Within one slicer, multiple selected items combine with OR, so East and North together show rows for either region.
Slicers that filter each other
When you have several slicers on one PivotTable, selecting an item in one slicer changes the buttons in the others. Items with no matching data in the current selection appear dimmed. Suppose you select Region = East. The Product slicer then dims products that East never sold. This tells you which choices still return data.
Dimmed buttons are still clickable. By default, Excel hides nothing and only changes the appearance. The slicer settings chapter covers how to hide items that have no data entirely.
The diagram below shows how slicer selections flow into a PivotTable.
Clearing the filter
There are three ways to remove a slicer's filter. All of them return the slicer to the state where every item is selected.
- Click the Clear Filter button in the slicer's top-right corner. It looks like a funnel with a red X. It is grayed out when nothing is filtered.
- Press Alt+C while the slicer is selected.
- Right-click the slicer and choose Clear Filter from "Region".
Clearing affects only that slicer. If other slicers or report filters are active, the PivotTable stays filtered by them.
Clearing a slicer is not the same as deleting it. Deleting removes the control from the sheet, and it also removes the filter it was applying. Do not delete a slicer when you only mean to reset it, because you will have to insert it and format it again.
Selecting from the keyboard
Slicers are usable without a mouse. Click the slicer once so it has focus, then use these keys:
- Arrow keys move between buttons.
- Space selects the focused button.
- Ctrl+Space adds or removes the focused button without clearing the others.
- Alt+C clears the filter.
Common errors
- "The slicer does nothing." Check that the slicer is connected to the PivotTable you are looking at. A slicer connects only to PivotTables that share its pivot cache. The connections chapter covers this in detail.
- "I selected one item but two show." Something else is filtering or adding items. Check for a second slicer, a report filter, or a manual filter on the field.
- "My totals changed and I do not know why." A slicer may be filtering a field that is not in the layout. Look for slicers on the sheet, including ones scrolled out of view or placed on another sheet.
- "The buttons I need are not there." A slicer lists the items that were in the source data when the PivotTable last refreshed. New items appear after you refresh the PivotTable with PivotTable Analyze > Refresh.
- "Clear Filter is grayed out." All items are already selected, so there is nothing to clear.
Checking the current selection in a cell
A slicer shows its selection visually, but you may want the selection to appear in a title cell. A slicer does not write its selection to a cell by itself. A common workaround is to add the same field to the PivotTable's Filters area, then read the filter cell. Another is to use a formula over the PivotTable's visible rows. Both are optional and beyond what this chapter needs. Just remember that the slicer is the source of truth for what is selected.
Practice walkthrough
Use any PivotTable with Region, Product, and Sales fields.
- Insert slicers for Region and Product.
- Click East in the Region slicer. Note the grand total.
- Hold Ctrl and click North. Note that the grand total grows.
- Click Clear Filter on the Region slicer. The total returns to the all-regions value.
- Click East again, then look at the Product slicer. Find any dimmed buttons.
- Turn on Multi-Select in the Product slicer and choose two products.
- Clear both slicers and confirm the original total returns.
Exercise
A PivotTable has a Region slicer with East and North selected, and a Year slicer with 2025 selected. Which rows does the PivotTable show, and what single action returns the Region slicer to showing every region without touching the Year slicer?
Show answer
It shows rows where the region is East or North and the year is 2025. Items within one slicer combine with OR, and different slicers combine with AND. Click the Clear Filter button on the Region slicer (or press Alt+C with it selected). The Year slicer stays on 2025.
Exercise
You are working on a tablet with no keyboard and need to select East, South, and West in a Region slicer. Which feature do you use, and how do you leave that mode?
Show answer
Turn on the Multi-Select toggle in the slicer's top-right corner, then tap each of the three buttons. Tap the toggle again to return to single-click selection, or use Clear Filter to reset the selection.