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: 
camila1
Contributor
Contributor

Count number of weeks in a the current month

Hi! I don't know how to count the number of weeks in the current month of the year or how to count the number of weeks between two dates

Labels (1)
2 Replies
MarcoWedel

can you please post some sample data as well as your expected results, because there might be more than just one possible definition of those calculations.

thanks

Marco

Qlik-Gerardo
Partner - Contributor II
Partner - Contributor II

Hello @camila1 

I guess you could get the Week number for both First Day of Month (MonthStart) and Last Day of Month (MonthEnd) using today date as base date, and then substract both.

Week(MonthStart (Today()))

>> OUTPUT >> 10

Week(MonthEnd(Today()))

>> OUTPUT >> 14

14 - 10 = 4 weeks

Good luck! 

Gerardo