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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate rolling weeks

How do I calculate last week when I also get 201152 for the two first days of 2011. If I use max(YearWeekCounter) it

points to number nine.

error loading image

I also have problem to sjow the right value in the header: Wich field should meet one week back?

error loading image

Is there any tutorial for Set Analys wich describe each element in a Set Analyse ?

kindly

Håkan

1 Solution

Accepted Solutions
Not applicable
Author

Hi again,

thanks for fast answers all of you.

What shall I change in my master calendar or in my tWeek counter to get the first and second of januar

to belong to week 52(2010). This must be a common problem every year and I assume there is a 'default

fix' for this, or am I wrong.

kindly

Håkan

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

first of all

you have problem in your data

the first two days of the year belong either to 201052

or to 201101

they cant belong to 201152 its the last week of the year

i assume what you did is to concatenate week of a date and year of a date you ended with the wrong result.

what you get in the caption i assume is 201151 but if you slove the first problem it'll correct the second problem

hector
Specialist
Specialist

Hi,

Instead of concatenate the year and the week, better use weekname(date field), it will return the correct value

Rgds

Not applicable
Author

Hi again,

thanks for fast answers all of you.

What shall I change in my master calendar or in my tWeek counter to get the first and second of januar

to belong to week 52(2010). This must be a common problem every year and I assume there is a 'default

fix' for this, or am I wrong.

kindly

Håkan