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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Writing a filter to override existing filter

Hi, I have filters that filter by date.

Based on certain parameters, I would like to create an option to change the Date filter on the fly, with a different date filter

Ex. the default is to show all records where the based on todays date (all records < todays date (ex. 4/8/20220)
I'm looking to create a new filter with an option, where if chosen would say "Show all records where intead of todays date, use last day in this month (ex. 4/30/20220)

Is there a way to create a filter that replaces the action of an existing date filter on the fly, in case the user chooses it?

3 ACCEPTED SOLUTIONS
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Maybe I'm not clear enogh to your problem. If there is a column of dates to be used as a slicer, in order to make the date displayed by the slicer earlier than today, you can create a measure like this:

Filter Measure =
IF ( SELECTEDVALUE ( 'Date'[Date] ) < TODAY (), 1, 0 )

Put the measure in the slicer visual filter and select it to 1, then the slicer will be filtered.

vkalyjmsft_0-1649751060481.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

Anonymous
Not applicable

That worked and thank you very much!

View solution in original post

Hi @Anonymous ,

It's my pleasure!

If it helps, would you please kindly accept it as the solution, other members will benefit from it.

Best Regards,
Community Support Team _ kalyj

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

That worked and thank you very much!

Hi @Anonymous ,

It's my pleasure!

If it helps, would you please kindly accept it as the solution, other members will benefit from it.

Best Regards,
Community Support Team _ kalyj

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Maybe I'm not clear enogh to your problem. If there is a column of dates to be used as a slicer, in order to make the date displayed by the slicer earlier than today, you can create a measure like this:

Filter Measure =
IF ( SELECTEDVALUE ( 'Date'[Date] ) < TODAY (), 1, 0 )

Put the measure in the slicer visual filter and select it to 1, then the slicer will be filtered.

vkalyjmsft_0-1649751060481.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.