Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
lost_rabbit
Contributor III
Contributor III

Get Total number of ISO Weeks by Year

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)

Labels (1)
1 Reply
brunobertels
Master
Master

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