Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
m_aa
Advocate I
Advocate I

How to clear slicer if the other slicer selection is changed?

Hi all,

 

I'm facing an issue with slicer selections. I have three slicers, first one is the year slicer, the second one is where users can choose which periods they want to track, by months or by weeks, and the third one contains values for month/week selection. The idea is to show values for the certain period if chosen in third slicer (in the first screenshot), otherwise show values for the whole year (in the second). 

m_aa_2-1644572132202.png                   m_aa_3-1644572162389.png

This works fine until I want to change months to weeks. When I select week in second slicer, if the third slicer was selected it still has the value (in this case, some month). So all values in visuals show as blanks which is expected behaviour. Same happens when changing year. 

m_aa_4-1644572570826.png                   m_aa_5-1644572602264.png

 

Is there any way to clear slicer when the other slicer is changed? This is really confusing for users to see blanks (and irritating for me :/)

 

Any help is appreciated! 

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@m_aa  There's no way to clear a slicer when another slicer changes. You could try hierarchical slicer but not sure that will meet your bespoke requirements. https://docs.microsoft.com/en-us/power-bi/create-reports/power-bi-slicer-hierarchy-multiple-fields 

 

Alternatively, you could add a button that says 'Clear slicers' or something more meaningful and this will reset the slicers to default. If you choose this option, create a bookmark for SELECTED VISUALS and select the slicers you want to clear. Ensure only the 'data' is selected for the bookmark. Update the bookmark while selecting all slicers you want cleared on the page. https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_11.html 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

1 REPLY 1
AllisonKennedy
Super User
Super User

@m_aa  There's no way to clear a slicer when another slicer changes. You could try hierarchical slicer but not sure that will meet your bespoke requirements. https://docs.microsoft.com/en-us/power-bi/create-reports/power-bi-slicer-hierarchy-multiple-fields 

 

Alternatively, you could add a button that says 'Clear slicers' or something more meaningful and this will reset the slicers to default. If you choose this option, create a bookmark for SELECTED VISUALS and select the slicers you want to clear. Ensure only the 'data' is selected for the bookmark. Update the bookmark while selecting all slicers you want cleared on the page. https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_11.html 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.