Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

kumarreddy257
Contributor

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
Valued Contributor III

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

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)

kumarreddy257
Contributor

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

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]

jaaldurgam
Valued Contributor

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

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

Community Browser