When using the WeekOfYear PowerQuery function I found the following two issues:
- If a week, starting with Monady and ending with Sunday, goes into the next year, then the same week gets a different number in the old year and in the new year. But same week must have same number, because it’s the same week.
- If January first is a Friday, Saturday, or Sunday then all week numbers are 1 too high for the whole year!
In this example 53 would be the correct week number for January 1st 2021, January 2nd 2021 and January 3rd 2021. And 1 would be the correct week number for January 4th 2021 and so on.These are at least the rules in Germany.
Are there parameters to make Date.WeekOfYear work like a calendar, or is there a different function, or do I need to fix this by programming some logic around Date.WeekOfYear?