Sub topic 8
Choosing between a slicer and a filter
This chapter assumes you can add a visual to a report page, know the difference between a table, a column, and a measure, and have already seen both slicers and the Filter pane. It helps you decide which one to use for a given need. It runs about 650 words.
Two tools, one result
Slicers and filters both narrow the data that visuals show. They differ in who controls them and how visible they are.
- A slicer is a visual on the canvas. Readers see it and click it.
- A filter lives in the Filter pane. It applies to a visual, a page, or the whole report, and it can be hidden or locked.
Both feed the same filter context, so a visual cannot tell which one removed a row.
Decision criteria
Ask these questions in order.
- Should the reader change it often? If yes, use a slicer. If the choice is fixed, use a filter.
- Should the choice be visible on the page? A slicer shows the current selection. A filter in a collapsed pane is easy to miss.
- What scope do you need? A slicer affects the page by default, and you can extend it with Edit interactions or sync it across pages. A filter has a built-in scope: visual, page, or report.
- Do you need logic a slicer cannot express? Top N, "is not blank", and "contains" conditions belong in the Filter pane.
- Is the field in the data only for control? A field used only to restrict data, such as
IsActive = TRUE, belongs in a filter. Readers do not need to see it.
| Need | Better choice | Reason |
|---|---|---|
| Reader picks a region or category | Slicer | Visible, one click |
| Show only the top 10 products | Filter (Top N) | Rule-based, not a manual pick |
| Exclude test or inactive records everywhere | Report-level filter | Applies to every page, hidden from readers |
| Compare one visual to the page | Visual-level filter | Affects only that visual |
| Let readers choose a date range | Slicer (Between) | Interactive and visible |
| Always show the last 30 days | Relative date filter | Updates itself, no reader action |
Worked example
Suppose a sales report has a Regional Overview page and a Product Detail page.
- A Region slicer lets managers focus on their own region. It is a slicer because readers change it all the time and need to see the current choice.
- A Top N filter on the product bar chart limits it to the five best products by
Total Sales. It is a visual-level filter because it is a fixed rule for one chart. - A report-level filter sets
Product[IsDiscontinued]toFALSE. Every page respects it, and readers never need to touch it.
The Selected Category measure from the DAX examples can also show the active slicer choice in a card or title, so the page explains itself.
Selected Category =
SELECTEDVALUE ( Product[Category], "All categories" )How they combine
Filters from slicers, the Filter pane, and cross-highlighting stack. A row appears only if it passes all of them. This is the source of many surprises. A report-level filter hides discontinued products, so a slicer that lists categories will still show only categories that have active products, and a visual may appear empty if the combined conditions leave no rows.
Common mistakes
- Using a slicer for a rule. If the reader should never change the choice, a slicer adds clutter and invites mistakes.
- Using a hidden filter for something readers expect to control. They will not know why the numbers differ.
- Adding many slicers. Each one takes space and makes combinations harder to reason about. Move rarely used choices into the Filter pane.
- Setting a page-level filter when a visual-level filter is enough. Other visuals on the page lose rows without anyone noticing.
Exercise
A report must always exclude orders with Status = "Test" on every page. Managers also need to choose a sales region themselves. Which tool fits each need, and at what scope?
Show answer
Use a report-level filter for Status, set to exclude "Test", because it is a fixed rule that applies to all pages and readers do not need to change it. Use a slicer for Region, because readers change it often and need to see the current selection. Sync the slicer across pages if the region choice should carry over.
Exercise
A page has a Category slicer and a visual-level Top N filter showing the top 5 products. A reader selects a category that has only 3 products. How many products does the visual show, and why?
Show answer
Three. The slicer narrows the data to that category first, and the Top N filter then keeps up to 5 of the remaining products. Since only 3 exist, the visual shows 3.