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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
pbrenneise
Frequent Visitor

Custom Rolling Date Range Filter for Report

Hi folks,

 

What is an effective way to build a fourteen day rolling date range in a Power BI report, especially when you need it to target a specific date? It needs to be something like the most recent Monday and fourteen days prior. I've found good examples online, which I can use to target the starting date and the end date of this range, but I haven't had any success using something equivalent to DATESBETWEEN or DATESINPERIOD to achieve this. Here's an example I've been working with targeting the most recent Saturday (based on another forum post I found):

 

Using DAX: 

 

Most Recent Saturday = TODAY() - WEEKDAY( TODAY() )
 
 
Rolling Two Week Filter = DATESBETWEEN('DateTable'[Date Column], [Most Recent Saturday], [Most Recent Saturday]-14)
 
Essentially, this would need to serve as a report-wide filter. Thank you!
 
pbrenneise
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@pbrenneise , Measure most recent Monday and last 14 days

 

WTD Today =
var _min = TODAY() -WEEKDAY(TODAY(),2) +1 -14  //Monday week start
var _max = TODAY() -WEEKDAY(TODAY(),2) +1
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

 

For other days you can refer blog to get week start date

 

.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...
https://medium.com/chandakamit/cheat-sheet-any-weekdays-week-start-date-just-one-variable-apart-6b2e...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@pbrenneise , Measure most recent Monday and last 14 days

 

WTD Today =
var _min = TODAY() -WEEKDAY(TODAY(),2) +1 -14  //Monday week start
var _max = TODAY() -WEEKDAY(TODAY(),2) +1
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

 

For other days you can refer blog to get week start date

 

.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...
https://medium.com/chandakamit/cheat-sheet-any-weekdays-week-start-date-just-one-variable-apart-6b2e...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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