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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sjtalkar
Frequent Visitor

Hierarchy Date Slicer Month and default Previous Week duplication when month changes

Hello,

We have a requirement where the user would like to open the Power BI  report to a default of the previous four weeks selected in a hierarchical date slicer. The date slicer has Year, Month and Week End Dates in the hierarchy.
We created a new column in the calendar table that marks the previous week, previous 2 weeks.... This updates with the refresh without issues, that is as the week end changes, the the value "Previous Week" is displayed against the correct Week End Date.

We published the report to the service with Previous Week, Previous 2 weeks , Previous 3 weeks and Previous 4 weeks selected. We see this default working fine when all the weeks are in the same month. When the month changed from September to October,  We see the Previous Week in September continue to be present and is also selected. The Previous Week also shows up in October and is NOT selected. We can assume as October rools by we will see duplication of Previous 2 weeks and so on in Spetember and October.

Is this the right behavior and are we misunderstanding the usage of the default selection? If not, can someone help with a resolution.
NOTE:
1. The data is refreshed and the new set of dates for previous week is duly updated in Power Query . Screen shot attached.
2. When the mnth changes we now have Previous Week in the visual in September and October

Here is an issue we found similar but not same as described as above: Default slicer selection in Power BI Desktop not retained after publishing · Issue #84 · liprec/azur...
Previous Week Visuals2.PNGPrevious Week Visuals1.PNG

3 REPLIES 3
sjtalkar
Frequent Visitor

We do not expose the Filter pane for other business reasons. The user, yet, needs to have the flexibility to choose from both the set of relative past weeks as well as any week in any year. Thanks for your reply but I found a solution on Medium that is more aligned with our requirement. Dynamic default slicer value in Power BI | by Mateusz Mossakowski | Microsoft Power BI | Medium

 

 

 

 

Another way would be to use Field Parameter measures.

lbendlin
Super User
Super User

We have a requirement where the user would like to open the Power BI  report to a default of the previous four weeks selected in a hierarchical date slicer. The date slicer has Year, Month and Week End Dates in the hierarchy.

Abandon your slicers and use the Filter Pane.  It has built-in relative date filters.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.