Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hi there,
I am looking to create weekly buckets to sort data within a date column, so that the week starts on a Saturday and ends on a Friday. For example: Saturday, October 1, 2022 through Friday, October 7, 2022 should display October 1, 2022. And Saturday, October 8, 2022 through Friday, October 14, 2022 should display October 8, 2022.
I used the following formula: 'Date'[Date] - WEEKDAY('Date'[Date], 2) - 1, but this did not have the desired outcome because the column is still using Monday as the start day for each week. Additionally, I tried changing the arguements to the WEEDAY function, but it appears I am only allowed to enter in 1 through 3.
Any help with with this would be greatly appreciated.
Solved! Go to Solution.
Thanks for the clarification @Greg_Deckler ! I was able to get the same results using "+1" at the end of formula instead of "-1"
'Date'[Date] - WEEKDAY('Date'[Date], 16) - 1
Hi @Greg_Deckler ,
Thank you for the prompt reply! Unfortunately, the formula provided did not have the desired outcome. I was able to brute force the desired outcome using a long "if" statement.
Thanks again!
Using 16 as the second parameter of weekday returns Saturday = 1 and Friday = 7.WEEKDAY('Date'[Date], 16)
Thanks for the clarification @Greg_Deckler ! I was able to get the same results using "+1" at the end of formula instead of "-1"
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
72 | |
69 | |
48 | |
40 |
User | Count |
---|---|
61 | |
41 | |
33 | |
31 | |
28 |