Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Rangesum 13 WKS Load Script

Hello,

I am trying to do a rolling 13 week sum on a specific field in the load script (see attached image), as the expression/set analysis I have, while working, is significantly slowing down the report. I spent some time looking at the other related questions on the forum, but am still having some difficulty understanding how to write it out. Most related questions revolve around taking the whole sum, not broken down by a specific time-frame (in my case, 13wks).

Here is the expression I have, and works: 

Avg(Aggr(RangeSum(Above(Sum(QUANTITY) , 0, 13)), PRODUCT, YYYYWK))

So, each quantity figure should be a rolling 13 WK sum, aggr by the Product & YYYYWK field.

This is the table that I have in the load script currently:

TABLE2:
LOAD
YYYYWK,
YYYYQ,
PRODUCT,
KEY,
QUANTITY
Resident TABLE1;

 

Would anyone be able to help me understand how to write in the load script a rolling 13 wk sum on the Quantity field, aggr by Product and YYYYWK? I know I would have to do a Group by, but since I had it by PRODUCT and YYYYWK in the set analysis, what about the other fields (YYYYQ, KEY).

Thank you very much in advance.

Regards

 

 

Labels (4)
1 Reply
Contributor III
Contributor III

Any suggestions on this?