Sub topic 4
Selection behavior and slicer formatting
This chapter assumes you can add a slicer to a report page and bind it to a field, as covered earlier in this tutorial. Here you will control how a slicer responds to clicks and how it looks. Both settings live in the Format pane of the slicer.
How selection works
A slicer starts with no items selected, which means the field is unfiltered and all values pass through. Once you select one or more items, only rows matching those items reach the other visuals.
The Format pane has a Slicer settings section with a Selection group. It contains three toggles:
| Setting | What it does | Typical use |
|---|---|---|
| Single select | Allows only one item at a time. Clicking another item replaces the current one. | Choosing one year or one scenario |
| Multi-select with Ctrl/Cmd | A plain click selects one item. Ctrl+click (Cmd on Mac) adds more. | Protecting readers from accidental multi-selection |
| Show "Select all" option | Adds a **Select all** item at the top of the list. | Long lists where readers often want nearly everything |
Check the Multi-select toggle in your own report, because the default can differ between slicer styles and versions. If you turn it off, every click toggles that item and you can select many items without a keyboard modifier.
Select all works differently from picking every item by hand. After you select Select all and then clear one item, the slicer stores an exclusion ("everything except this item"). New values that arrive after a data refresh are included automatically. If you click every item individually, a later refresh does not add the new values.
Readers can clear a slicer with the eraser icon in its header. If you hide the header, they lose that control, so provide another way to reset, such as a bookmark button.
Formatting a slicer
Formatting does not change the filter logic, but it changes how easy the slicer is to use. The main groups in the Visual tab of the Format pane are:
- Slicer header: the title and eraser icon. Turn it off to save space, or rename it in the title text so readers know what they are filtering.
- Values (or Options for some styles): font, text size, and colors for items, including the selected state.
- Layout (or Orientation): vertical or horizontal arrangement. Horizontal layouts suit short lists such as years or regions and act like a row of buttons.
- Style: list, tiles, or dropdown, depending on the data type.
A dropdown saves page space and suits long lists. A vertical list or tile layout shows all choices at once, so readers see the available options without opening anything. Use a consistent style across slicers on the same page.
Keep the selected state visually distinct. If your theme uses light gray for both selected and unselected items, readers cannot tell what is filtered. Check the contrast on the selected-item color.
Showing the current selection
Slicer formatting does not tell readers what is selected once the slicer is collapsed. A measure can show it in a card or title. This measure from the plan returns the chosen category, or a fallback text when none or several are selected:
Selected Category =
SELECTEDVALUE ( Product[Category], "All categories" )With Single select on, this measure always returns the chosen category (or the fallback when nothing is selected). With multi-select, it returns the fallback as soon as two items are chosen, because SELECTEDVALUE only returns a value when exactly one remains in the filter context.
Common mistakes
- Turning on Single select and then expecting a total across several items. Single select cannot do this.
- Hiding the header and leaving no way to clear the selection.
- Using a narrow vertical list for many items without search or a dropdown style, so readers must scroll.
- Assuming that clicking all items equals Select all. Only Select all keeps new values after a refresh.
Exercise
A report page has a Year slicer with Single select turned off and Multi-select with Ctrl/Cmd turned on. A reader clicks 2023, then clicks 2024, and reports that only 2024 is filtered. What happened, and which setting would you change so that a plain click adds items?
Show answer
With Multi-select with Ctrl/Cmd on, a plain click replaces the selection, so the click on 2024 replaced 2023. The reader needs Ctrl+click (Cmd+click on Mac) to add 2024. To let a plain click add items, turn Multi-select with Ctrl/Cmd off. Each click then toggles an item.