Discussion Board for collaboration related to Creating Analytics for QlikView.
hi I have two variables
Let vCurWeek = replace(WeekName(Today()), '/', '');Let vLastWeek = Replace(WeekName(Today()-7), '/', '');
which gives me vCurWeek=201115 and vLastWeek=201114
now I want a loop
For i= 0 to 'End of period'
That means for Example if I consider 4 weeks[201114-201117)
How to use that variable in a loop like
For i= 0 to ($(vLastWeek)+4)-1
This does not work. Any idea?
Go to Solution.
I'm not sure if I understood you, but the solution seems to be:
For i= $(vLastWeek) to ($(vLastWeek)+3)
Is this what you need?
That was easy. Thanks! Sometime small things are overseen, I am trying on this.
can you help me realise?
Thanks once again.
glad to help.
One thing you must have in mind is when your end of period goes to the next year.
For example 201150 to 201202. The for loop wont work correctly, and you'll need no treat these situations.