Forum Discussion
Week 53
- 5 years ago
Hi IF ,
That has to do with the start of the week check the post below with some explanations about it.
https://www.timeanddate.com/date/week-numbers.htmlhttps://www.quora.com/What-year-will-have-53-weeks
Don't forget to mark the correct answer to help others.
Hi IF
Not sure if this is the correct option about your data but believe that you only consider 53 weeks on leap years, if this is the fact change your week.year column to the following code:
if Date.IsLeapYear([Date])
then
Text.PadStart(Number.ToText(Date.WeekOfYear([Date])),2,"0")
& "." &
Number.ToText(Date.Year([Date])) else if Date.WeekOfYear([Date]) = 53 then Text.PadStart("1",2,"0")
& "." &
Number.ToText(Date.Year([Date]) + 1 ) else Text.PadStart(Number.ToText(Date.WeekOfYear([Date])),2,"0")
& "." &
Number.ToText(Date.Year([Date]))
In this case I'm picking up the week were the number is 53 and making it on the first week of the other year.
- IF5 years agoPost Prodigy
Thanks. On the other hand I have just realized that 2015 has 53 week but not 2016. 🤔
All the best!
- MFelix5 years agoSuper User
Hi IF ,
That has to do with the start of the week check the post below with some explanations about it.
https://www.timeanddate.com/date/week-numbers.htmlhttps://www.quora.com/What-year-will-have-53-weeks
Don't forget to mark the correct answer to help others.