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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ThomasDay
Impactful Individual
Impactful Individual

reset slicer without bookmark

Hello Fellow Daxers

 

Is it possible to reset a slicer using a Dax measure and not a bookmark?  I have a matrix, filtered by providers.  If just two providers are set--I have a slicer that presents some nice options to look at various pieces of a venn diagram.  (ALL, BOTH, 1 only, 2 only).  But if a user selects three or 50 providers, the slicer should basically just show ALL and no other options.  

 

What happens, is if the last slicer selection is BOTH...and the user picks more providers--I can get the slicer to show one item, but can't get the slicer to reset so that it will always show ALL (or disappear for that matter.) 

Here's the measure I use to filter to get it to show just one item if more than 2 providers:  I was hoping the filter in the Calculate would reset the table and therefore the slicer.  I know, that doesn't make sense...but what does?

NotHeadToHeadFilter = IF([DestProvCountForMatrix] <> 2, CALCULATE([DestProvCountForMatrix],JoinOptions[Index] = 1),2)


I can do this with buttons/bookmarks, but I'm curious so...is there another way?  Here's a sample .pbix and some screenshots.  Thank you! Tom

This one is Great!This one is Great!Want to have it reset to ALLWant to have it reset to ALL

 

5 REPLIES 5
amitchandak
Super User
Super User

@ThomasDay , I doubt on desktop. You have an option in power bi service. So if the report will be viewed on service their option to reset.

@amitchandak  Yes, the report will be viewed in power bi service.  That's encouraging...how do I reset the slicer in service?  Thank you, Tom

Hi @ThomasDay,

If you are work on the 'read view' mode of power bi reports, it is possible to use 'rest to default' option to restore all the changes to raw report contents. (it does not clear up all filter effects and it just the restore to raw graph)

Announcing Persistent Filters in the Power BI Service 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft Thank you for your suggestion...that's not really what I'm after but thank you for thinking of ways I might be able to get to what I'm looking for.  Tom

Hi @ThomasDay,

In fact, current power bi does not support to use of DAX formula to change slicer selections.

It is possible to use the measure as a filter and use it on visual level, but it not modify the current selections. (it can filter the visual item list based on formula expression to achieve some operations which default slicer features not support. e.g. or logic filter, reverse filter...) Applying a measure filter in Power BI 

Perhaps You can submit an idea to improve the slicers features.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.