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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Blake753
Helper II
Helper II

Group Dates into 2 week intervals

I have a set of data with dates starting on 1/5/2020.  I need to group these dates in a column into 2 week intervals with the last Saturday date being the return value.  These dates always begin on a Sunday and end on a Saturday.  For example:

 

1/5/2020 would return 1/18/2020

1/17/202 would return 1/18/2020

1/19/2020 would return 2/1/2020

 

and so on

 

 

1 ACCEPTED SOLUTION

@Blake753 , Try like

 

Week end date = date(2020,1,5) + (Quotient(datediff(date(2020,1,5),[Date],day),14)+1)*14
Share with Power BI Enthusiasts: 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

4 REPLIES 4
amitchandak
Super User
Super User

@Blake753 , You can divide into week like this

 

2 Week No = Quotient(datediff(date(2020,1,5),[Date],day),14)+1

 

Week end date = date(2020,1,5) + (Quotient(datediff(date(2020,1,5),[Date],day),14)+2)*7

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That didn't quite seem to work, here are the results I'm seeing:

Blake753_0-1601472072068.png

@amitchandak 

@Blake753 , Try like

 

Week end date = date(2020,1,5) + (Quotient(datediff(date(2020,1,5),[Date],day),14)+1)*14
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak I had to change the start date to January 4, 2020 as it was one day off but it seems to have worked, thank you very much

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.