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
jbhca12
Helper I
Helper I

Slicer not fully disabled

Hi Everyone,

New to the forum and learning Power BI on the fly in a fairly new position. Here's my issue and yes, I have searched, A LOT, for an answer and cannot locate anything.

I have a slicer based on Ship Date where I have set a bunch of preset date periods along with a "Custom" selection. If the user selects "Custom", then a date range slicer below will enable and allow the user to use a slider and select their own custom date range. So far, so good.

 

jbhca12_0-1620399039669.png

 

If the user decides to go back and select a preset date period, the date range slicer should disable. However, if they made any change to the default date on that date range slicer, one or both of the actual date fields on the slicer remain enabled if the user goes back and selects a preset date period.

jbhca12_1-1620399137739.png

 

The user has to actually select the "Clear selections" icon on the date range slicer in order to fully disable those date fields. Does anyone know a way to force the slicer to fully disable?

Thanks!

JB




1 ACCEPTED SOLUTION

Hi @jbhca12 ,

 

I followed the tutorial and I notice that every time he changes from custom to another type of visualization he selectes the full slicer.

 

This is mentioned on the comments of the youtube video:

 

MFelix_3-1620831334242.png

 

What I think you need to do (to have the reset) is use bookmark has I refered that way you can force the data to be reset something similar to this:

 

In this case I have hidden the period selection because I believe is more user friendly in terms of user experience, left the selection of the period so that the user can see what he has available.

Custom_period.gif

Just giving options the slicers have the following options:

 

MFelix_0-1620831115174.png

MFelix_1-1620831128995.png

 

Depending on the rest of the interactions with your report you may need to change the other options on your bookmark specially the Data and Selected visual options

 

MFelix_2-1620831228733.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

10 REPLIES 10
MFelix
Super User
Super User

Hi @jbhca12 ,

 

This happens because of the way the slicers and overall filtering works that "saves" the latest information.

 

I believe that the best option instead of having the option custom on the slicer is to have two bookmarks one that shows the two slicers and then one that turns off the date periods and resets the range to the full data, in this cases you just need to be aware that one will ahve the Data option turn on and the other is off so that the slicer can reset to the initial values.

 

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I'm not sure I understand how you "turn off" a slicer with a bookmark? I don't think I can just disable the date periods slicer when the user selects "Custom", even if "Custom" is not a choice in the date periods slicer but an image you click on.

I like the fact that I can control the date range slicer with a filter that tells it to only show the items in the slicer when the filter value is 1, which is when the user selects "Custom" from the date period list. I just don't understand why, when the user selects something other than "Custom" from the date period list that it doesn't follow the same filter and NOT show the items in the date range slicer.

If you have a solution, can you be a bit more specific as to how you would address it? I've tried what you suggested but have no way of disabling the date periods list and no idea which bookmark you suggest should have data checked and which one should not?

Hi @jbhca12 ,

 

I got lost at something you said in the previous post:

 


@jbhca12 wrote:

I just don't understand why, when the user selects something other than "Custom" from the date period list that it doesn't follow the same filter and NOT show the items in the date range slicer.

 

You want the slicer to be adjusted accordingly to the dates of the previous selection?

 

How do you have the slicers setup? and the filterings?

 

 



Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I have a "Date Periods" table that the "Ship Date Periods" is associated with.

jbhca12_0-1620747830493.png

The "Date Periods" table contains date, type and order columns. This is the filter for the "Ship Date Periods" slicer.

jbhca12_1-1620747940503.png

When selecting anything other than "Custom" from the "Ship Dates Period" slicer, the following slicer is disabled...

jbhca12_3-1620748111151.png

The above slicer is related to my "Date" table which contains all of the dates available via the following DAX:

Date =
CALENDAR(
MIN(Bookings[Create Date]),
TODAY()
)
 
This "Date" table contains a measure called "Date Slicer Filter" with the following DAX:
Date Slicer Filter =
IF(
SELECTEDVALUE('Date Periods'[Type]) = "Custom",
1,
0
)
 
So the filter on the date range slicer looks as follows:
jbhca12_4-1620748265717.png

So when someone selects "Custom" from the "Ship Date Period" slicer, the date range slicer will enable:

jbhca12_5-1620748339790.png

The problem is that if someone changes either date in the above slicer and then decides to click something other than "Custom" in the "Ship Date Periods" slicer, depending on which date changed from the original dates (1/2/2018 and 5/11/2021 in this example) in the date range slicer, when the Date Slicer Filter is reapplied based on the value now being 0 and not 1, the date range slicer disables, but one or both of the date fields on that slicer remain enabled and impacts the date selection for the report until the user physically clears the selections from that slicer...

 

jbhca12_9-1620749612027.png

 

Clicking the red circled "Clear selections" icon above results in what I would like to see (below) 

 

jbhca12_8-1620749144205.png

 

This is my current dilemma. I don't think controlling this using bookmarks is going to work.

If you want to see the YouTube video that this whole approach is based on, here it is.

https://www.youtube.com/watch?v=fKygF7VEJnQ&t=403s


Hi @jbhca12 ,

 

To what I can see from the video there is the used of a dimension table with the several dates and time ranges and the bidirectionality between both tables that will give you the filtering of the calendar table witouth the impact of the slicer in the other calculations. 

 

Are you using that table or just making it trough a filter only (0 and 1)?

 

If you are making it trough a filter the output will be different since the slicer will be always connected with the date table and your calculation will be impacted by the selection on the slider.

 

Sorry for continuing to make question but just want to understand your model in order to give you the best answer possible.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I'm doing it exactly as it is in the video. Filtering isn't the issue. Getting the range slicer to completely disable is the issue. If a user selects something other than "Custom" in the date period slicer, and if they made ANY changes to the default dates in the date range slicer, it will keep those two date inputs enabled. The rest of the slicer will disable as expected.

Hi @jbhca12 ,

 

I followed the tutorial and I notice that every time he changes from custom to another type of visualization he selectes the full slicer.

 

This is mentioned on the comments of the youtube video:

 

MFelix_3-1620831334242.png

 

What I think you need to do (to have the reset) is use bookmark has I refered that way you can force the data to be reset something similar to this:

 

In this case I have hidden the period selection because I believe is more user friendly in terms of user experience, left the selection of the period so that the user can see what he has available.

Custom_period.gif

Just giving options the slicers have the following options:

 

MFelix_0-1620831115174.png

MFelix_1-1620831128995.png

 

Depending on the rest of the interactions with your report you may need to change the other options on your bookmark specially the Data and Selected visual options

 

MFelix_2-1620831228733.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I think this may be the solution. I have one "minor" issue I am working on that I'd like to get some guidance on and then I think I can mark this as solved.

My slicer panel opens and closes by clicking on an image. I have the slicer panel opening based upon a bookmark with data unchecked. This way, whatever the slicer selections were when the slicer panel was closed will be preserved if/when the user re-opens the panel. This leads me to my one and hopefully final question relating to the status of the date period slicer and the date range slicer...

Is there a way to programmatically show or hide a visual? I know you can do this with a bookmark, but, for example, if the user has a custom date range selected and closes the panel, I want that same selection to show when the panel is re-opened. So it's kind of related to the solution provided.

Thanks!

Hi @jbhca12 ,

 

In this case you need to have two additional bookmarks and link them to the data bound:

 

MFelix_0-1620913458663.png

If you click on the several images you can see that according to the selection you have different changes of the visualizations.

 

Be aware that you may need also to create another one for the case when you select the predefined values to hide and show, then depending on the bookmark you are you present the corresponding button, so if tyou have just selected custom period you need to show the button custom period hide (no matter if the selection of the period was done or not) however the button after hidding a custom period is the custom period show data.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks, I think I have it all set. I ended up duplicating some buttons and images to handle both cases as well as a bookmark for each case depending on what the user selected...user selecting predefined date range or custom date range...and then closing the slicer panel. A bit of a pain and would have rather controlled it using a couple of measures and some overlays but that would only work when the slicer pane was open. For some reason when opening a closed slicer panel the measure checking for the use of the custom date range would be ignored so the button and slicer would not change accordingly. Ah well, I guess you get what you get when you don't have complete control over coding a solution.

Thanks for all of the help...I think I have what I need for now! Much appreciated!

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.