Forum Discussion
Automatically update a slicer based on day of week
- Anonymous5 years ago
Hi NitaT ,
Currently, we are not able to set default value as you describe and disable the ability for user to cancel choice in slicers.
Although this isn’t natively supported as of yet, we can imitate this functionality with a little bit of DAX! A general overview of the process to accomplish this task is as follows:
- Create a slicer.
- Create a measure to determine how many selections are currently made on the slicer. We’ll call this Current Selections.
- Create a measure to determine the total number of possible slicer selections. We’ll call this Total Selections.
- Create a final measure using logic from the previous two steps. If Current Selections = Total Selections, then something, else something (We’ll fill this in later).
Reference: Setting a Default Slicer Selection
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi NitaT ,
Sorry, not very clear. What do you want to make the current week? Can you display a expected result?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Sorry my query was not very clear...let me try again:
I am using a financial year and weeknumber slicer, to filter the pivot table by the days of the week. The reporting week is Sunday to Saturday. In the example below the dates displayed are for fiscal week 10, on Monday week 11 will be added to the "Select Week Number" slicer as the data for Sunday will be available. Currently, on Monday, I will need to manually select week 11, to display the sales data for the new week.
What I would like is for the slicer to automatically select week 11 when the day changes to Sunday.