Forum Discussion

alsolok's avatar
alsolok
Helper II
2 years ago
Solved

default data slicer

Hello everyone   I have a date table with a 4-year history plus the current year. I would like to set a default selection in my Power BI slicer for a year based on the current year without losing t...
  • amitchandak's avatar
    2 years ago

    alsolok , You can use preselected slicer from custom visual 

     

    Or you can do the workaround by creating a column a column like below and save it on "This Year"

     

    Year Type = Switch( True(),
    year([Date])= year(Today()),"This Year" ,
    year([Date])= year(Today())-1,"Last Year" ,
    Format([Date],"YYYY")
    )

     

    Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA