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
- Brian415_2 years agoFrequent Visitor
Jonvoge Thanks for the quick response! Strange that a simple functionality like this is not possible. I am hoping someone maybe has a clue how you can achieve this easier. I almost refuse to believe there is no way to achieve this. Hopefully someone can help.
AmiraBedh amitchandak Any clue maybe?
- AmiraBedh2 years ago
Super User
Sorry I saw your message late 🙂
- ribisht172 years ago
Super User
Please check https://community.fabric.microsoft.com/t5/Desktop/Date-slicer-default-to-the-current-week/td-p/1531599
This one with PBIX
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series- Brian415_2 years agoFrequent Visitor
ribisht17 Thanks, but this doesnt work. Your first link for example; will limit the slicer behaviour to only the current week. I want that the date slicer is automatically set by DEFAULT current week. If the user wants to change it to another date, he should be able to trough adjustment. With this solution you are only able to see current week to my understanding.
- Anonymous2 years agoNot applicable
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 😄