Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to calculate the cumulative sum with respect to each product .i.e the cumulative sum should restart for every product. I tried Solved: Cumulative Sum in QlikSense Expression using Range... - Qlik Community - 1691470 this solution, but it happens to give 0 in some of the values.
Table includes Year,Product,Total Cost
For certain products it is working fine ,for others it is not ,why is this happening?
Has anyone faced this issue, Please help with your inputs
I prefer to make in the script
Fatotmp:
NoConcatenate
LOAD *
Resident Fato
Order by Product,Year,[Total Cost];
Drop Table Fato;
Final:
LOAD
Year,
Product,
[Total Cost],
If(Product = Previous(Product) ,RangeSum(Peek(Vl_Acumulado),[Total Cost]), [Total Cost]) as Vl_Acumulado
Resident Fatotmp
Order by Product,Year,[Total Cost]
;
Drop Table Fatotmp;