Forum Discussion
Sachy123
Helper V
7 years agoCumulative total for a simple table
I have following simple table : Scale = DATATABLE("Scale",INTEGER,{{1},{1000},{1000000}}) Now , I just want to add one more column to it , so that I can get a cumulative sum like 1, 10...
- 7 years ago
Hello Sachy123 ,
We just need to feed it the current row in a variable and use it to filter our sum:
Running Total = VAR RowScale = Scale[Scale] RETURN CALCULATE ( SUM ( Scale[Scale] ), Scale[Scale] <= RowScale )*Removed the unneeded filter.
jdbuchanan71
Super User
7 years agoHello Sachy123 ,
We just need to feed it the current row in a variable and use it to filter our sum:
Running Total =
VAR RowScale = Scale[Scale]
RETURN
CALCULATE (
SUM ( Scale[Scale] ),
Scale[Scale] <= RowScale
)*Removed the unneeded filter.
- Sachy1237 years ago
Helper V
I was just not able to refer to the current row-- thanks for this tip