Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calender - More values in the last week of the year

Hi Folks,

I having problem with calnder last week. when I selected 52 week in the Weeks, I got values from 12/27/2011 to 1/2/2011. But the values Jan 1st & 2nd values didn't got in 2011 Week1. Please find the attched png and qvw.

Please suggest how can i overcome this.

Thanks in Advance .........

Regards,

Siri

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I believe QlikView is using ISO 8601 week numbers.  In the ISO week date system, January 1-2 are part of the last week of 2010.  It sounds like you might want this instead?

1+ceil((Date-floor(weekend(yearstart(Date))))/7)

View solution in original post

3 Replies
johnw
Champion III
Champion III

I believe QlikView is using ISO 8601 week numbers.  In the ISO week date system, January 1-2 are part of the last week of 2010.  It sounds like you might want this instead?

1+ceil((Date-floor(weekend(yearstart(Date))))/7)

Not applicable
Author

Hi John,

Thanks for your reply and achive it.

Thanks...........

sofiene_1920
Partner - Contributor III
Partner - Contributor III

Hi John,

Good Solution to calculate the WTD :

1+ceil((Date-floor(weekend(yearstart(Date))))/7)

Je l'utilise déjà pour le calcule du WTD (le cumule hebdomadaire des ventes) mais il y a un choix stratégique à faire avant de l'utiliser !

Soit qu'on veut commencer notre analyse par la première semaine de l'année en cours qui peut contenir que deux jours comme l'exemple que tu viens de présenter (1+2 janvier) et on la compte une semaine (numéro 1 non pas 52).

Soit nous comptons que les semaines pleines du lundi au dimanche quelque soit l'année / mois / date, dans ce cas là, la première semaine sera celle du 03/01/2011.

Merci.

thx