Forum Discussion

jerryr125's avatar
jerryr125
Icon for Helper IV rankHelper IV
1 year ago
Solved

Calculating 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

  • Yes, exactly such easy and you can also replace Day.Saturday by number and rewrite it as

    Date.WeekOfYear([ABCDate], 6)

  • Anonymous's avatar
    Anonymous
    Not 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