Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
1 year ago
Solved

Set Filter to Default

Good day everyone. I have a dashboard in PowerBi that contains a filter with all the weeks of the year and I need this filter to always have the current week filtered when the report starts. As an...
  • Uzi2019's avatar
    Uzi2019
    1 year ago

    Hi Syndicate_Admin 

    Or try this

     

    Current Week =
    var Currweek= WEEKNUM(TODAY(),1)
    Var Curryear= YEAR(TODAY())
    var Final= IF('Calendar'[WeekNo.]= Currweek && 'Calendar'[Year]= Curryear," Latest Week", "Week " &CONVERT('Calendar'[WeekNo.], STRING))
    RETURN Final
     

     

    I hope this would get what you are looking for.