Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am trying to calculate a cumulative count on a straight table with multiple dimensions.
My data is composed of an ID field and 3 dimensions A, B and C.
In my table I calculate the number of occurrences of each pattern A/B/C that I am sorting descending. On top of that I would like to have a cumulative sum of my count(ID), like this:
A | B | C | Count(ID) | CumulativeCount(ID) |
---|---|---|---|---|
M | 10 | Test1 | 8 | 8 |
F | 10 | Test1 | 7 | 15 |
F | 20 | Test2 | 6 | 21 |
M | 10 | Test2 | 6 | 27 |
F | 20 | Test1 | 4 | 31 |
But I cannot get this Cumulative Count working. I tried full accumulation option, aggr(rangesum(above... and rangecount too but it won't work.
Also I cannot pre-calculate the accumulations in the script as my columns are added dynamically (using enable conditional).
Does anyone have any idea?
Thank you,
Thomas
PS: I attached an example of my problem in qvw
TOTAL is your friend:
=RangeSum(Above(TOTAL count(ID), 0, RowNo(TOTAL)))
Thank you Jonathan, I forgot about TOTAL.
Unfortunately it did not fix the whole thing, but I now have a better idea of what is the problem:
Is there a way to custom sort the temporary table that aggr() is creating?
follow the links please