Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Working with calendar weeks

Hi,

Can you please help me to fix this issue :

I have a list of calendar weeks in this format YYYYWW stored in a calendar table :

201301, 201302 , ...., 201324

And i want to get in the same format the last n weeks.

For example:

If i choose the 201304 and n= 6 weeks

I have to get this :

201303 201302 201301 201252 201251 201250

Thanks in advance

1 Reply
alexandros17
Partner - Champion III
Partner - Champion III

You need 6 (n) variables,

the first one is

=if(right(GetFieldSelections(week)-1,2)='00',

(
left(GetFieldSelections(week),4)-1)*100+52,

GetFieldSelections(week)-1

)

other 5 are the same