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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.