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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Afiq_Danial
Helper II
Helper II

Filtering of date slicer

Hi everyone,

 

I have a data which shows from 4 July 2004 till 31 July 2024

I encountered a problem. Right now, my date slicer shows from 4 July 2004 till 31 July 2024.

 

Afiq_Danial_0-1675396481657.png

 

I want to make it in a way that it will only show the (today) - 14 days until 31 July 2024. Example, its 3rd february today. I want it to show 2 weeks before february meaning it will be 20 January till 31 July 2024. Is there way i can do this?

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Afiq_Danial ,

 

You can create a measure as the visual-level filter.

For example,

Measure = IF(MIN('Calendar'[Date])>=TODAY()-14,1)

Put this measure into it, and set up show items when the value is 1.

12.png

Add a filter to a report in Power BI - Power BI | Microsoft Learn

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Afiq_Danial ,

 

You can create a measure as the visual-level filter.

For example,

Measure = IF(MIN('Calendar'[Date])>=TODAY()-14,1)

Put this measure into it, and set up show items when the value is 1.

12.png

Add a filter to a report in Power BI - Power BI | Microsoft Learn

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

danextian
Super User
Super User

Hi @Afiq_Danial ,

 

In your Dates table (or whatever the name of the table that contains the date), create a calculated column to filter the slicer. Add the calculated column to the visual tile in the filter pane and set it to true.

datefilter = 
Dates[Date] >= TODAY()-14

danextian_0-1675397585517.png

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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