In Power BI, cascading slicers are slicers that filter the selection available in the second slicer, making it dependent on what has been selected in the first. To do this, steps must be followed to create and manage the related filtering functions.
- Define Relationships Between Tables: First of all, make sure that the data model created has correct relationships between the corresponding fields that will be used as cascading slicers. For instance, in the case of a slicer, such as “Country” and “City,” make sure that the two slicer fields are related tables (ex Country > City) so that the cascading effect can take place. This is important because, without this relationship, Power BI cannot cascade the slicers, as it uses relationships to cross-filter the data from different tables.
- Create Slicers Individually: Create slicers for the fields that you need. For this, place the respective field, e.g., country and city, in the report canvas, and from the visualization pane, choose slicer visual. Order the slicers according to the sequence of meaning, i.e., the first parent slicer country will be placed above the second child city slicer.
- Enable Cross-Filtering: By default, slider options should affect other slab options if any relationship is created in the data model. Check its suitability through the Edit Interactions feature under the Format tab in Power BI. For instance, click on the upper-class slicer country and ensure that it is ticked in the dependent class city slicer. This will prevent the slicer of the city from being active and showing all the options except for that pertaining to the country that has been selected.
-
- Evaluation and Improvement of User Experience: Once setup has been completed, run some tests on your cascading slicers to check whether they work as intended. For instance, choose an item from the parent slicer (say, a specific country) and check that the child slicer (for example, cities) updates to display only the relevant selections. One may also wish to refine some of the proposed formatting options in order to improve the ease of use for the end user, such as providing appropriate titles or instructions to accompany the cascading selections.
Based on the aforementioned guidance, you should have achieved the ability to add cascading slicers into your Power BI report that automatically refresh when a user makes a selection. This will aid users in filtering information easily.