Forum Discussion
Syndicate_Admin
1 year agoAdministrator
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
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 FinalI hope this would get what you are looking for.
3 Replies
- Uzi2019Community Champion
Check this blog
I hope I answered your question!
- Uzi2019Community Champion
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 FinalI hope this would get what you are looking for.- Uzi2019Community Champion
check this video
https://www.youtube.com/watch?v=FPQ6DohK6Pw&t=149s
just change Month to week level indax.