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 August 31st. Request your voucher.

Reply
whatisdata96
Helper I
Helper I

How to get Week START and Week END Date? Week Start = Saturday & Week End = Friday) in my date table

Hi all - question says it all.

 

I have a date table in my model. I need 2 columns. Week start = Saturday .. Week End Date = Friday.. If anyone could help, please provide DAX for this considering I have a date table with a date column in it.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @whatisdata96 

 

You can try the following methods.

Column:

Weekday = IF(WEEKDAY('Date'[Date])<=6,WEEKDAY('Date'[Date])+1,WEEKDAY('Date'[Date])-6)
Weeknum = CALCULATE(COUNT('Date'[Weekday]),FILTER('Date',[Weekday]=1&&[Date]<=EARLIER('Date'[Date])))
Week Start = CALCULATE(MIN('Date'[Date]),FILTER('Date',[Weekday]=1&&[Weeknum]=EARLIER('Date'[Weeknum])))
Week End = CALCULATE(MAX('Date'[Date]),FILTER('Date',[Weekday]=7&&[Weeknum]=EARLIER('Date'[Weeknum])))

vzhangti_0-1662107763767.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @whatisdata96 

 

You can try the following methods.

Column:

Weekday = IF(WEEKDAY('Date'[Date])<=6,WEEKDAY('Date'[Date])+1,WEEKDAY('Date'[Date])-6)
Weeknum = CALCULATE(COUNT('Date'[Weekday]),FILTER('Date',[Weekday]=1&&[Date]<=EARLIER('Date'[Date])))
Week Start = CALCULATE(MIN('Date'[Date]),FILTER('Date',[Weekday]=1&&[Weeknum]=EARLIER('Date'[Weeknum])))
Week End = CALCULATE(MAX('Date'[Date]),FILTER('Date',[Weekday]=7&&[Weeknum]=EARLIER('Date'[Weeknum])))

vzhangti_0-1662107763767.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

SecretChimpanze
Frequent Visitor

Week end date =date_column+(7-WEEKDAY(date_column,16))

Week start date =date_column-(7-WEEKDAY(date_column,16))

amitchandak
Super User
Super User

@whatisdata96 , I have two blogs for that, refer

 

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...

 

Refer the file attached after signature

 

In Power Qyery you can use Date.StartOfWeek with a number change start of week

Date.StartOfWeek and Date.EndOfWeek: https://www.youtube.com/watch?v=8HNicSedIds&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=104

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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