I have a measure "Sales" by "month":
| month | Sales |
|---|---|
| 01-2023 | 10 |
| 02-2023 | 20 |
| 03-2023 | 15 |
| 04-2023 | 30 |
| 05-2023 | 13 |
and I need the cumulative sum presented in a Dynamic cross table :
| month | 01-2023 | 02-2023 | 03-2023 | 04-2023 | 05-2023 |
|---|---|---|---|---|---|
| Sales | 10 | 30 | 45 | 75 | 88 |
I tried using
RangeSum(Above(TOTAL Sum(Sales), 0, RowNO(TOTAL)))
It works for normal tables (by column) but when I use it in a dynamic cross table (by row), I get:
| month | 01-2023 | 02-2023 | 03-2023 | 04-2023 | 05-2023 |
|---|---|---|---|---|---|
| Sales | 0 | 0 | 0 | 0 | 0 |
I've also seen solutions involving changing the script but it would almost double the size of my app.
Since you are transposing the
monthdimension then the values are becoming columns.The expression should be changed to respect that:
Aboveis nowBeforeRowNois nowColumnNoThe full expression will be:
Rangesum(Before(Sum(Sales),0,ColumnNo()))And the result table is: