Forum Discussion

PBI_2K26's avatar
PBI_2K26
Icon for Advocate I rankAdvocate I
10 days ago
Solved

Dynamic default Year Value

Hello ! I'm looking for a way to have a Year slicer that displays all available years, while automatically selecting the current year by default (e.g., 2026 today, 2027 next year). The default selec...
  • ShahRukhSameer's avatar
    10 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.