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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sum of 13 previous rows

Hi,

I am trying to achieve the sum of exactly previous 13 rows for Achievement. My data is structured on weeks, quarters and fy. For eg on week 9 of any quarter i want the whole sum of previous weeks in that quarter + the previous ones from prior quarter until there are 13 weeks.

w9=sum(week9->week1 current quarter)+sum(week10->week13 previous quarter).

w10=sum(week10->week1 current quarter)+sum(week11->week13 previous quarter)

w1=sum(week1 current quarter )+sum(week2->week13 previous quarter)

Any ideas how it can be achieved?

There is also an example in the attached xls file.

Thank you for your help!

10 Replies
Anonymous
Not applicable
Author

Hi HIC,

I would like to give the credit to you and mark this as Correct Answer but i can't because there is a small mistake. Please remove "-" from the front of 12 and then is correct.

Thank you,

Cristina