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 example:

In the image you can see the filter in question, being today 01/24/2025, the week of the year is the 4th.

Under these conditions, the filter should have 4 enabled as the default value.

Thank you all very much

Pablo

  • 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.
     
     

3 Replies