Applying slicing and filtering
The ability to focus your report to show exactly what you want to see is one of the biggest advantages of using a modern reporting platform. Filtering allows you to remove data so you can focus on the data that is needed for a particular scenario. Filtering can be applied directly to all pages in the report, only the current page, or only the selected visual. Additionally, you can use a slicer visual to build custom filtering directly on the report page.
Slicers and filters are similar; both will enable you to filter data in your report. Though both are similar, filters are generally faster and do not take up space on the report page. Slicers, though slower, can have conditional formatting and some users find them more intuitive, as they do appear on the report page. Slicers can have more advanced filtering options than the filters pane, which is designed for more basic operations.
Slicers can be customized to include lists, drop-down selectors, or button selectors, and they can be formatted to allow the single-selection or multi-selection of values.
Figure 9.32 – Slicer configured for a report
Slicers are great for the following cases:
- You want the report user to be able to apply commonly used filters.
- Filtering on fields that have been hidden from the data.
- Making filtering easier for your end users by prepopulating the fields and the values to filter by.
- Showing slicer visuals on the report, making a more focused experience for the report user.
Tip
Drop-down format slicers can help improve performance by deferring the queries sent to the dataset.
Slicers can be configured in many ways, and this happens the same way it does with other visuals, on the Format your visual tab of the Visualizations pane. Options for slicers include the following:
- Single select – Off by default. This option allows the slicer to be configured to only allow one selection at a time.
- Multi-select with CTRL – On by default. This option allows the slicer to be configured to allow the selection of multiple values by holding down the Ctrl key while clicking.
- Show “Select all” option – Off by default. This configuration will provide another value that the user can select to automatically select or check all values in the slicer.
While slicers are useful, Power BI includes basic filtering capabilities using the filters pane as well. The filters pane can handle basic slicer operations. Using the filters pane allows you to maximize the use of the report canvas for visuals rather than using the canvas space for slicers.
The filters pane will enable the filtering of visuals that have been added to the report canvas and have configurations for filters that can be applied to the visual, the page, or all pages in the report.
Report designers can customize the filters pane by doing the following:
- Adding or removing fields users can use to filter
- Adjusting the fonts and colors of the filters pane
- Setting the default state of the filters pane (open or closed)
- Making the filters pane or specific filters visible or hidden
- Setting a lock on filters that you don’t want users to change
Next, let’s look at how we can use R or Python visuals to add additional visualization capabilities to Power BI reports.