Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to count weeks in a date range?

Hi,

how can I count, in script,  weeks in a data range, considering that I can have different years?

If EndDate and StartDate are weeks, I cannot do something like this because I have different years, so I can have week #3 twice, for 2012 and 2013.

Load Distinct

          weekend('$(EndDate)' - Recno() +1) as DATA_GIACENZA

          AutoGenerate( '$(EndDate)' - '$(StartDate)');

How can I do that?
Thanks a lot!

0 Replies