Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Solved! Go to Solution.
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])))
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.
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])))
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.
Week end date =date_column+(7-WEEKDAY(date_column,16))
Week start date =date_column-(7-WEEKDAY(date_column,16))
@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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |