Forum Discussion
Dynamic default Year Value
- 30 days ago
Hi PBI_2K26,
There isn't really a native way to make a standard Year slicer dynamically change its selected value based on TODAY().
A relative date slicer can be dynamic, but it doesn't give you the exact behaviour you're asking for: showing all years while automatically selecting the current year.
One workaround is to create a measure such as:
Current Year Flag =
IF (
MAX ( 'Date'[Year] ) = YEAR ( TODAY() ),
1,
0
)You can then use that measure as a filter for the relevant visuals, while keeping the Year slicer available for users to override it. However, the slicer itself won't visually show the current year as selected.
A bookmark can give you a default selection, but you'd have to update the bookmark when the year changes, so it isn't truly dynamic.
Hi PBI_2K26, building on Nasif_Azam suggestion, you can use "Button Slicer" visual, which has a label section
Your value is still the "Year Slicer" and then you add a label to "Year". What you can do next is to turn off "Value" and keep only "Label".
So in backend you're still filtering "Year Slicer" where you have a static value "Currecn Year", which you need. But visually you only show label, which can be dynamic ;)
Good luck with your work! :)