Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I have a between date range slicer.
The slicer has a filter applied that sets the start date of the slicer and the end date of the slicer to roll over each year. The code behind the filter is:
Current Range =
VAR _Today = TODAY()
VAR _Year = IF ( MONTH ( _Today ) < 8, YEAR ( _Today ) - 1, YEAR ( _Today ) )
VAR _Start = DATE ( _Year, 8, 1 )
RETURN [Date] >= _Start && [Date] <= _TodayHowever, I want to now be able to see the previous years date by defaulting the slicer to the filter but with the option to drag the slicer back in time and having the default roll over each year. I can achieve viewing the historic data by setting the _Start variable to (2022, 8, 1) but I still need a way for the default filter to be applied when the report is first opened (this need to dynamically rollover each year).
For example:
My slicer should look like this when I first open the report, then once 01/08/2024 comes the default filter would move to 01/08/2024 with the ability to scroll back to 2023 and 2022.
Is this possible?
You cannot programmatically set the selected values of a visual. Use the filter pane with relative date filters instead and allow users to change filters.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.