Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a pivot table where i need to do rolling sum by subproducts..
Product | Year | Month | subproduct | Normal Value | Rolling Sum |
P1 | 2015 | Jan-15 | A | 10 | 10 |
B | 12 | 12 | |||
C | 13 | 13 | |||
Feb-15 | A | 11 | 21 | ||
B | 45 | 57 | |||
C | 20 | 33 | |||
Mar-15 | A | 4 | 25 | ||
B | 65 | 122 | |||
C | 10 | 43 |
above is my data set.. and i want to calculate the rolling sum by subproducts..
Thanks in advance.
Regards,
Aashish
Sum(Aggr(RangeSum(Above(Sum(Value), 0, RowNo())), SubProduct,Product,Year, Month))
FieldNames are case sensitive in QlikView so change according to your application.
i.e. SubProduct to subproduct etc..
Seems works to me
Sum(Aggr(RangeSum(Above(Sum([Normal Value]), 0, RowNo())), subproduct,Product,Year, Month))
Use aggr( rangesum(above( sum(NormalValue), 0, rowno() )), subproduct, Month) for your rolling sum.