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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

retrieve past 3 weeks and current week from Time Week Year Number column

Hi,

I have a column like [Time Week Year Number] and it is having values like 1 to 53. I want to retrieve past 3 weeks and current week value. Pls help me how to get it.

Regards,

Kumar

3 Replies
nagaiank
Specialist III
Specialist III

If you have the current week number in a variable ( e.g. vCurrentWeekNumber) from your calendar, you may use the expression

[Time Week Year Number] >= $(vCurrentWeekNumber) and [Time Week Year Number] <= $(vCurrentWeekNumber)

Anonymous
Not applicable
Author

Hi,

Thanks for ur reply.

I need past 3 weeks. Here we can't get past 3 weeks, I am thinking. Can you correct me, if I am wrong.

I have week numbers from this column [Time Week Year Number]

SreeniJD
Specialist
Specialist

Hi Kumar,

Try this..

Last 3 weeks..

If you have date, use this format..

Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=WeekStart(Max(Date), -2))<=$(=Date(Max(Date)))’}>} Value )

Regards,

Sreeni