Forum Discussion
jerryr125
Helper IV
1 year agoCalculating the current week number - starting with the previous Saturday
Hi - I presently have a calculation in my Power Query application for the Week Number:
Date.WeekOfYear([ABCDate], Day.Monday)
I would like to Week Number to start from the previous Saturday to the Current Week Friday.
Example:
Week #42 would be from Saturday, October 12th to Friday October 18th
If ABCDate is within that range, it would have a value of "42"
Is it as simple as :
Date.WeekOfYear([ABCDate], Day.Saturday)
Thoughts ? Jerry
Yes, exactly such easy and you can also replace Day.Saturday by number and rewrite it as
Date.WeekOfYear([ABCDate], 6)
4 Replies
- Greg_Deckler
Community Champion
jerryr125 Yes, that should be how to do it.
- Omid_Motamedise
Super User
Yes, exactly such easy and you can also replace Day.Saturday by number and rewrite it as
Date.WeekOfYear([ABCDate], 6)
- jerryr125
Helper IV
thank you !!
- AnonymousNot applicable
Hi jerryr125
Did the solution Omid_Motamedise and Greg_Deckler offered help you solve the problem, if it helps ,you can consider to accept them as solutions so that more user can refer to.
Best Regards!
Yolo Zhu