Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calender

In the calender, when I select the first quarter(q1), week displays 1,2,3,4,....14 and 52 also how to solve this?

And how to avoid 52nd week?

5 Replies
sushil353
Master II
Master II

post your script

martin_dideriks
Partner - Contributor III
Partner - Contributor III

There is not anything wrong with your script.

I.e. 2012-01-01 was part of week 52. The same issue is found with 2011-01-01 and 2006-01-01.

How do you think it should be solved? Do you want to move the date to the next week, or what do you see as solution that makes sense?

It can be solved....the question is, why and how?

//Martin

rubenmarin

Week() funtion will return '52' for '01/01/2012' and '52' for '30/12/2012'.

Also will return               '1' for '01/01/2013' and '1' for '30/12/2013' it depends if the first week of the year takes more days from the ending of the last year or the starting of the new.

To avoid this you can use in script an expression like:

Ceil((Date-YearStart(Date)+WeekDay(YearStart(Date))+1)/7) --> This will return a week number starting by 1 and ending by 52-54

mdmukramali
Specialist III
Specialist III

agomes1971
Specialist II
Specialist II

Hi,

all depends on your concept of week.

Yes, this is Redefining the Week Numbers the best link on week definition on QlikView.

Regards

André Gomes