Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I think my problem can best be illustrated with this example.
I have data like this:
Month | Incoming Stock |
1 | 10 |
2 | 20 |
3 | 30 |
4 | 12 |
5 | 5 |
6 | 60 |
7 | 3 |
What I want to do is having a sum for the entire incoming stock values that are newer than the value in the current row. So for the first row it would be the sum of values of incoming stock for months 2 to 7. The resulting table should be like so:
Month | Incoming Stock | Total Incoming |
1 | 10 | 130 |
2 | 20 | 110 |
3 | 30 | 80 |
4 | 12 | 68 |
5 | 5 | 63 |
6 | 60 | 3 |
7 | 3 | 0 |
Ideally this should be in the load script. But a solution as a measure would also work. Currently I don't really know how to approach this.
Update, I found the solution. This measure works in the example above:
rangesum( below( sum([Incoming Stock]),1,NoOfRows()))
Update, I found the solution. This measure works in the example above:
rangesum( below( sum([Incoming Stock]),1,NoOfRows()))