Power BI Slicers and Filters
Besides the built-in cross-filtering and cross-highlighting among visuals, Power BI supports two explicit filtering options: slicers and filters. Which one to use? Traditionally, you would use a slicer when you want the user to easily see what’s filtered on the report page. But with the introduction of the new filter pane and slicer enhancements, the choice becomes more difficult. Let’s compare the two options:
Criteria | Slicer | Filter |
Placement | Report page (requires space on the page as other visuals) | Report pane |
Filter target | Visual, page, report | Visual, page, report |
Configuration | Drop-down, list, slider (numbers and dates), “buttons” | Basic and advanced |
TopN/BottomN filtering | No | Yes |
Can be hidden | Yes | Yes |
Can be visible but read-only | No | Yes |
Searching | Yes (must be enabled) | Yes (automatically enabled for larger lists) |
Relative dates | Yes | Yes |
Can be filtered by measure | Yes | No |
Geo location filtering | No | Yes |
Cross-filtering fields in same table | Automatically cross-filters other slicers with fields from the same table | Automatically cross-filters other slicers with fields from the same table |
Cross-filtering fields in other tables | Can be accomplished with a filter on a measure | No |
Support hierarchies | Yes | No |
Selecting default value programmatically | No | Only with Power BI Embedded JavaScript APIs |
Persistent filters | Yes | Yes |
Power BI Mobile considerations | Users find it difficult to select values in lists | Better user experience |
Power BI Embedded considerations | Passing a filter via JavaScript APIs to set default values cross-filters the slicer but doesn’t pre-select the slicer default value | Sets the filter as expected |
A glaring gap for both filters and slicers is that you can’t currently set the default value programmatically, such as to default a date filter to the last date with data. As a workaround, you can add a field to the Date table, such as IsToday, that is set to Yes for the last date and prefilter on this field, but users must be educated to know how to remove the filter if they want to select another date. This is especially cumbersome with slicers, which don’t even support a single date selection, unless configured as a drop-down or Before/After.
Based on experience, people tend to rely mostly on slicers. But because it’s not uncommon to create reports that must be visually appealing on desktops and mobile devices, here are some recommendations to accommodate both large and small displays.
- Use slicers judiciously because they take space on the report page. This could be an issue with mobile devices. Besides taking space, mobile users find it difficult to select values in slicers. I typically use slicers only for common filters, such as Date. Another scenario where slicers could be useful is when you need to visualize the items in a special way, such as a slider or to show a hierarchy of items.
- Use filters for the rest of the filtering needs, especially if you plan to optimize reports for mobile viewing in portrait mode and/or use Power BI Embedded to embed reports.