Forum Discussion
Change or switch slicer selection based on another slicer?
Hi all,
I would like to ask for your help or some suggestions to manage a situation. Let me explain better:
I have two filters, area and project. The area is a dropdown filter with multiple selections; The project is a radio button filter. Both are already selected as they should not show cumulative data but granular data.
In my scenario, I need to change the project selection based on the area and ensure that the project from the previous area does not remain in the list.
Could you kindly suggest a guide or a workaround to meet this requirement?
Thank you for your time.
Best regards
3 Replies
- FarhanJeelani
Super User
Hi AnaMariaDe ,To achieve dynamic slicer behavior in Power BI where the selection in one slicer (Area) influences another slicer (Project), you can use the following approaches:
Option 1: Sync Slicers with Filters and Relationships
-
Create a relationship:
- Ensure the Area and Project fields are connected through proper relationships in your data model.
- For example, if Area and Project are from different tables, create a relationship between them in the model view.
-
Apply cross-filtering:
- Set the cross-filter direction to “Both” in the relationship settings if needed.
This ensures that selections in the Area slicer automatically filter the available options in the Project slicer.
Option 2: Use Measures and Conditional Filtering
If direct relationships don't work due to model complexity or other constraints:
Use a DAX measure to dynamically filter the Project slicer based on the Area slicer selection.
Example:
FilteredProjects = CALCULATE( DISTINCT('Project'[ProjectName]), FILTER('Table', 'Table'[Area] IN VALUES('Area'[Area])) )Add the measure to your visual or slicer:
Replace the default Project slicer field with this calculated measure.
Option 3: Use "Sync Slicers" and Bookmarks
If you need greater control:
- Use bookmarks to save specific slicer selections.
- Sync slicers across pages, ensuring the Area slicer determines the Project slicer’s scope.
- Create a workflow: Use a combination of hidden visuals or buttons to mimic the behavior.
Please note:
If Area allows multiple selections, you might need to define rules for handling overlapping or cumulative Project selections.
Test the impact on performance if the model is large, as dynamic calculations can slow down visuals.
Please mark this as solution if it helps you. Appreciate Kudos.
-
- Ritaf1983
Super User
Hi AnaMariaDe
Unfortunately, as of now, Power BI does not support automatically clearing slicer selections based on changes in another slicer. To handle this scenario, you'll need to train users to manually click the "Clear Selection" (eraser) icon on the slicer to reset the filters.
However, there is an active feature request on this topic in the Power BI Ideas forum. I recommend voting for it to help prioritize its implementation:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=ec054bc8-beaa-ec11-826e-501ac50a5d5cI voted + shared with my colleagues.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Akash_Varuna
Super User
Hi , Please Try these
- Ensure a relationship exists between the Area and Project tables.
- Create a measure to filter projects dynamically
FilterProjects = IF(SELECTEDVALUE(Area[Area]) = MAX(Project[Area]), 1, 0) Apply this measure to the Project slicer as a filter (FilterProjects = 1).
Use Sync Slicers to link the Area and Project slicers, ensuring previous selections are cleared.
If this post helped please do give a kudos and accept this as solution
Thanks In Advance