Forum Discussion
Urgent Help: Set Date Slicer by Default to Current Week
Hi Brian415
This is a notoriously difficult requirement to deal with.
While it it possible to set a report to default to the range you are suggesting amd still allow some pre-defined flexibility (e.g. by using the method discussed here: Dynamic Date Range Slicer- Query M - Power Query / M Code Showcase - Enterprise DNA Forum), I have not found a good way to keep both Start and End og the period completely dynamic to the user.
My suggestion would be to use the above approach for your default page, and have a secondary page with a Between Slicer that they can adjust themselves (or perhaps a button to toggle between two bookmarks, instead of two pages).
_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data
Hi both,
(Thought I'd answer here so both get a notification).
The way I solved this issue was with a calcuated column and a drop down menu.
The formula basically checks if the week value of the dates column matches the week value of today(), if yes label it "Current week", else put in the number of the week (alternatively use "Week " & [number]), then in the dropdown using this calculated column, you'll have "Current week" selectable.
Have it selected when saved and published.
That way the default will always be with only the current week filtering selected, but users will also be able to expand their search if needed.
It's not ideal that it shows current week, instead of the actual number, but you can write some simlple Measures, that display the week or date in a card.
Hope that helps.
Note: if the week number is added to the Current Week label (eg Current Week 5), the application will fail the following week as it will fail to find the selected "Current Week 5", don't make the mistake I made 😄