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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shawry
Frequent Visitor

How to calculate week ending

Hi, 

I have a Week Ending formula to calculate the week ending date (ending on a Sunday). However, I've come across a problem when dealing with a Sunday. You'll see in my table that when the row is in fact a Sunday, it includes that in the following week. 

For example, you'll see that the 5th of March (which is a Sunday) is included in the following week i.e. Week Ending = 12th Sunday. 

Does anyone know how I would resolve this? 

Thanks!

 

Shawry_0-1678329420008.png

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

g

week Ending=[Date]-WEEKDAY([Date],2)+7

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

g

week Ending=[Date]-WEEKDAY([Date],2)+7
Shawry
Frequent Visitor

Thank you 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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