Forum Discussion
Setting month filter to current month by default
Hello,
I'm having a report page with year and month filters,Is there any way I can set up this page in a way that it shows current month selected by default(not through relative date filtering last 1 month ).
I cannot use relative date filtering..coz at times client wants to compare 2 months at a time of same year or different years like
Mar2020 and May 2020 comparison or Mar2020 and Mar 2018 comparison.
3 Replies
- manikumar34
Solution Sage
Foelr always keeping the current month as a default, I suggest to create calculated column using IF.
Something like this.
If(table[month] =max(table[month]), "current month", table[monthname])
Regards,
Manikumar
- amitchandak
Super User
kkalyanrr , You have to create a column like this in you date table
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)and use this to select This Month. You can sort this on month year sort
- v-yingjl
Community Support
Hi kkalyanrr ,
As far as I know, currently set the default slicer value as current month could not supported directly in power bi desktop, maybe you can refer the following simliar issues to try:
- How to set slicer default value of current month?
- Slicer to select current month as default
- How to show/set slicer to current month
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.