Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm running into trouble presenting a cumulative sum broken down by a dimension in a line chart.
I would like the following for "Cumulative Value". My current formula is rangesum(above(sum(Value), 0,3)), and it works in table form when you sort by Tier, and in the line chart when the primary dimension is Tier and the secondary is Month.
Month | Tier | Value | Cumulative Value |
Jan | 1 | 1 | 1 |
Feb | 1 | 3 | 4 |
Mar | 1 | 5 | 9 |
Jan | 2 | 7 | 7 |
Feb | 2 | 11 | 18 |
Mar | 2 | 13 | 31 |
However, when sorted by Month in table view (which is also the only sort available for a line char with date on the x-axis), the following happens:
Month | Tier | Value | Cumulative Value |
Jan | 1 | 1 | 1 |
Jan | 2 | 7 | 8 |
Feb | 1 | 3 | 3 |
Feb | 2 | 11 | 14 |
Mar | 1 | 5 | 5 |
Mar | 2 | 13 | 18 |
Obviously it sums the values grouping by month rather than tier. Any solutions? I'd like the cumulative values from the first table visualized in a line chart with Month on the x-axis and Tier as the dimension. Thanks.
Try this
Aggr(
RangeSum(Above(Sum(Value), 0, 3))
, Tier, Month)