Forum Discussion
Dynamic filter for current month
Hello everyone,
I would like to know if there is any way to create a dynamic page filter so that whenever someone opens my PowerBI web dashboard, all the charts automatically adapt to the current month's data?
- Anonymous6 years ago
yeah,
Drag your date to the Filters on to the all pages filters.
change to relative date> Show items when the values is in this month
4 Replies
- AnonymousNot applicable
yeah,
Drag your date to the Filters on to the all pages filters.
change to relative date> Show items when the values is in this month
- slightlymNew Member
Do I understand correctly that this solution would work only with Direct Query?
- AnonymousNot applicable
Yes, add a calculated column to your table:
IsCurrentMonth = IF ( YEAR ( Table1[Create Date] ) = YEAR ( TODAY () ) && MONTH ( Table1[Create Date] ) = MONTH ( TODAY () ), "Yes", "No" )Then use this column as a page level filter: where IsCurrentMonth = "Yes"
- amitchandakSuper User
Anonymous , have a column like this in your 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")
)Select this month and save,
make sure is sorted on a column like
Format([Date],"YYYYMM")