I get strange results however.The cumulative sum has the wrong order. In my app I only have one table. For every %key_kpl /yearmonthnumber there is only one value. No matter what %key_kpl I select, the cumulative sum gets the wrong order at yearmonthnumber 24223.
Yearmonthnumber is calculated in my load script 2018*12+num(right(period,2)) where period is '2018-05' for example.
When I reduce the number of %key_kpl to one or two then the cumulative values are correct. So I assume it has something to do with the sorting in the load script, I tried several sorting but cumulatives remain wrong.
I spent several hours figuring out what the reason of this error can be, but now I am out of ideas.
I hope someone can give me a hint on how to solve this. We are version 12.10.20600.0. of Qlikview
AS said, I get the correct results when there is only one %key_kpl. HOwever it gets wrong when there are several. I still think it has something to do with sorting in the load script, but don't know what
I dont know how youa re sorting it. Sort it by %key first the by yearmonth. the same expression is working for me. Below is the sample data. remember to sort it by %keykpl first then by yearmonthnumber. Else post you app. I am pretty sure this will work
Seems to run well at first sight. But how do I achieve now that the running total will be limited to 12 months. ? I appreciate your help. Don't see the logic why the running total does not run well with my first expression.
In the original table I have more than 12 yearmonthnumbers for every %key_kpl. For every month the number increases with one. The goal is to sum current yearmonthnum and the preceeding 11 months. When you would help to achieve this I would appreciate that very much.