Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do you calculate the total number of iso weeks by year on the front end without a calendar dimension table in your data model?
Eg:
2020 - 53 weeks
2023 - 52 weeks
I need the number of weeks based on Year to calculate average .
Eg:
Avg Vol of 2020 would be Vol / 53 (No of ISO weeks in 2020)
Hello
To know if the annual calendar has 52 or 53 weeks, you must therefore know the day of January 1st. If January 1 falls on a Thursday (regular year and leap year) or Wednesday (leap year only) the ISO year will have 53 weeks. In all other cases the ISO year will have 52 weeks.
A leap year have 366 days , regular year have 365 days
hope it helps