Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
taniagn
New Member

Clean filter button with dates of current month

Hello everyone!

My objective is to create a clean filter button that automatically update itself with the current month.

I have a bookmark that clean filters by saving data as shown bellow.
However, it saves the date range that was displayed at the moment I saved the bookmark, for example (08/01/2021-08/31/2021). As time goes by, I would like the "clean filter button" to automatically bring the dates of the current month.

I tried a couple of things:
1- I created a colunm in my calendar that indicates that flag the current month and added it as a filter.
2- I used a relative date filter in addition to the "between" type of date filter.
I even edited the relations between the filters.
It kinda worked, but both solutions resulted in the utilization of 2 filters and the user had to make selections in 2 visuals, which is not ideal.

Is there a way to solve it? Does anyone have any idea?

Thanks in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Create a calculated column in your Calendar table that has a value for "current month"  versus "not current month" 

 

for example:  

CM = IF(YEAR(TODAY())=YEAR([date]) && MONTH(TODAY())=MONTH([date]),"Current","Other")

 

Then base your bookmark on that column equaling "Current".

 

Now each time your data refreshes this will get recomputed and reassigned.

 

Caveats:

- this assumes frequent (daily) dataset refreshes when in import mode. 

- may perform poorly in Direct Query mode

- Will not work across multiple timezones.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Create a calculated column in your Calendar table that has a value for "current month"  versus "not current month" 

 

for example:  

CM = IF(YEAR(TODAY())=YEAR([date]) && MONTH(TODAY())=MONTH([date]),"Current","Other")

 

Then base your bookmark on that column equaling "Current".

 

Now each time your data refreshes this will get recomputed and reassigned.

 

Caveats:

- this assumes frequent (daily) dataset refreshes when in import mode. 

- may perform poorly in Direct Query mode

- Will not work across multiple timezones.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors