Sub topic 4
Selection behavior and slicer formatting
This chapter covers how a slicer handles selections and how to format it so readers can use it. It assumes you can add a slicer to a page and know the difference between a column and a measure in the data model. Slicer types are covered in the previous chapter, so this one focuses on what happens after the slicer is on the page.
What a slicer selection does
A slicer holds a set of selected values. Power BI turns that set into a filter and applies it to every visual the slicer is allowed to affect. Visuals then recalculate their measures under that filter.
A slicer is always in one of three states:
- Nothing selected. The slicer applies no filter. Every value is included.
- One value selected. Visuals show only rows that match that value.
- Several values selected. Visuals show rows that match any of the selected values. The values are combined with OR logic within one slicer.
Slicers on different fields combine with AND logic. If one slicer selects Region = West and another selects Year = 2025, a visual shows only West rows from 2025.
The "nothing selected" state matters more than it first appears. It means "no restriction", not "no data". A measure that reads the slicer, such as the Selected Category measure used later in this chapter, must handle this state explicitly.
Single select and multi-select
By default, a list slicer lets a reader click one value and then hold Ctrl to add more. Clicking a second value without Ctrl replaces the first. Many readers do not know the Ctrl shortcut, so the default behavior is a common source of confusion.
You control this in the Format pane under Slicer settings and then Selection:
- Single select allows exactly one value at a time. Clicking a second value replaces the first. Clicking the selected value again clears it, unless you turn on Require single selection.
- Multi-select with Ctrl/Shift is the default for lists. It uses keyboard modifiers to add values.
- Show "Select all" option adds a checkbox at the top that selects every value. Selecting it and then clearing one value gives you "everything except this one", which is a quick way to exclude a value.
When Single select is on, a reader cannot choose several values. When Require single selection is also on, the slicer cannot be empty either. That second option makes the slicer behave like a radio button group, so one value is always chosen.
Use "Require single selection" when the report only makes sense for one value. A page that compares a chosen product against a benchmark is an example. Use plain multi-select with a "Select all" option when the reader needs to compare or combine several values.
Choosing between the options
| Situation | Suggested setting |
|---|---|
| Reader may compare several categories | Multi-select with "Select all" |
| Page shows detail for exactly one entity | Single select with "Require single selection" |
| Reader may want everything or one value | Single select, without "Require single selection" |
| Slicer on a field with a very long list | Dropdown style with search (see below) |
Searching within a slicer
A list slicer can show a search box when it has many values. Turn it on from the slicer's more options menu (the three dots) and choose Search. The reader types part of a value and the list narrows. The search does not apply a filter by itself. The reader still has to select the matching values.
Search is useful for fields with hundreds of values, such as customer names. It costs space, so leave it off for short lists.
Slicer styles that change selection behavior
The orientation and style of a slicer also affect how readers select values.
- Vertical list. Shows checkboxes or buttons stacked in a column. Good for short lists.
- Tile (horizontal). Shows values as buttons across the page. Good for a handful of values such as years or quarters.
- Dropdown. Collapses the list until the reader opens it. Good for long lists and small layouts. A dropdown with many selections shows only a summary of what is selected, so a reader may not see the full selection at a glance.
A dropdown hides the current selection once it is closed. If the reader needs to confirm what is filtered, pair the dropdown with a card that shows the selection. The Selected Category measure below is built for this purpose.
Showing the current selection in a card
You can read a slicer's selection from DAX. This lets a card or a visual title describe the current state. The measure below returns the selected category, or the text "All categories" when no value or more than one value is selected.
Selected Category =
SELECTEDVALUE ( Product[Category], "All categories" )SELECTEDVALUE returns the value only when exactly one value remains in the filter context for that column. In every other case, it returns the second argument. That covers both "nothing selected" and "several selected". If you leave out the second argument, the measure returns blank in those cases.
This is also where the empty state shows up. When no value is selected, the filter context contains all categories, so SELECTEDVALUE sees many values and falls back to the default text.
Two details to remember:
- The measure reflects the filter context of the visual it sits in. A card on a page with the slicer reflects the slicer. The same measure in a visual that has its own filter on Category reflects that filter instead.
- If a reader selects two categories, the card shows "All categories", which is misleading. If your report allows multi-select, consider a measure that uses
CONCATENATEXto list the chosen values. This is a design choice, so decide it when you plan the page.
Measures that depend on the selection
Selection behavior also determines what a measure returns. Start from a base measure:
Total Sales = SUM ( Sales[SalesAmount] )This measure is recalculated for every combination of slicer and filter selections. That is why the same measure shows different values in different visuals.
To show each category as a share of the selection, use ALLSELECTED:
Sales % of Selected Categories =
DIVIDE (
[Total Sales],
CALCULATE ( [Total Sales], ALLSELECTED ( Product[Category] ) )
)The denominator removes filters that come from the visual itself, such as the category on a chart axis. It keeps the filters that come from outside the visual, such as slicers. The percentages therefore add up to 100% of what the reader has chosen. If the reader selects two categories in a slicer, each bar shows its share of those two, not of the whole company.
For a fixed benchmark that ignores the slicer, use REMOVEFILTERS:
Total Sales All Products =
CALCULATE ( [Total Sales], REMOVEFILTERS ( Product ) )This ignores any filter on the Product table, including slicer selections. Place it next to a filtered value to show "selected versus overall".
The following table summarizes the difference.
| Function | What it keeps | Effect with a slicer |
|---|---|---|
| `ALLSELECTED` | Slicer and outer filters | Total follows the slicer |
| `REMOVEFILTERS` | Nothing on the named table | Total ignores the slicer |
| No function (plain measure) | All filters | Value follows every filter |
Formatting a slicer
Formatting makes a slicer readable and tells the reader what it does. Open the slicer, then select the Format pane. The main groups are listed below.
- Slicer settings. Choose the style (vertical list, tile, dropdown), orientation, and selection options described above.
- Visual, Values. Set the font, size, text color, and background of the items. Use a size that remains readable when the report is shown on a smaller screen.
- Visual, Items. Control the checkbox or button appearance, including selected and hover states. Make the selected state clearly different from the unselected state. Color alone is a weak signal, so add contrast or a visible check mark.
- Header. The header shows the field name by default. Replace it with a plain-language title such as "Product category" through the Title setting. Turn the header off only if a nearby text box already names the slicer.
- Padding and spacing. Add space between tiles so readers can tap them on a touch device.
- Alt text. Add alt text under General, Alt text so screen reader users know what the slicer filters.
Keep formatting consistent
Slicers that look different on each page make a report harder to learn. Pick one style, copy and paste the formatted slicer to other pages, and then use synchronization to keep selections aligned. Pasting preserves the formatting, so you do not repeat each setting by hand.
You can also save a formatting set as part of a theme file. That keeps slicers consistent across reports.
Common errors
- A slicer shows blank or "(Blank)" as a choice. The field has empty values in the data. Filter them out in the data, or add a visual-level filter on the slicer itself.
- A reader selects several values but the report shows one. The slicer is set to single select. Check Slicer settings under Selection.
- A card says "All categories" when two are selected.
SELECTEDVALUEreturns its default when more than one value remains. This is expected. UseCONCATENATEXif you want a list. - Percentages do not add up to 100%. The denominator probably uses
ALLorREMOVEFILTERS, which ignore the slicer. UseALLSELECTEDfor a share of the visible selection. - Dropdown hides the selection. Add a card that shows the selection, or switch to a list for short fields.
Practice
Exercise
A report has a Product[Category] slicer set to multi-select. A card uses SELECTEDVALUE ( Product[Category], "All categories" ). A reader selects Bikes and Accessories. What does the card show, and why? What would you change if you wanted the card to say "Bikes, Accessories"?
Show answer
The card shows "All categories". SELECTEDVALUE returns a value only when exactly one value remains in the filter context. With two selected, it returns the second argument. To list the selection, use a measure with CONCATENATEX over VALUES ( Product[Category] ), for example CONCATENATEX ( VALUES ( Product[Category] ), Product[Category], ", " ). Note that with nothing selected this lists every category, so wrap it in a check such as IF ( ISFILTERED ( Product[Category] ), ..., "All categories" ).
Exercise
You have a page that shows a detailed profile of one store. Which selection settings suit the store slicer, and why?
Show answer
Use single select with "Require single selection" turned on. The page only makes sense for one store, so the slicer should never be empty and should never hold several stores. A dropdown style with search also suits a long list of stores.
Exercise
A bar chart shows sales by category, with a Category slicer on the page. The share measure uses CALCULATE ( [Total Sales], REMOVEFILTERS ( Product ) ) as its denominator. A reader selects two categories, and the two bars show 8% and 5%. The reader expected 62% and 38%. What is wrong and how do you fix it?
Show answer
REMOVEFILTERS ignores the slicer, so the denominator is total sales for all products. Each bar is a share of the whole company. Change the denominator to CALCULATE ( [Total Sales], ALLSELECTED ( Product[Category] ) ), which keeps the slicer's filter and removes only the chart's own category filter. The two bars then add up to 100%.