Forum Discussion
mayurdhote
8 years agoRegular Visitor
Issue with Running Total
Let’s consider I have data as shown in below table and I want to calculate Running Total of Amount column as shown in last column i.e Running Total. Category TypeID Date Amount Ru...
- 8 years ago
Hi mayurdhote
In that case.
First Add an Index Column to your Table using QUERY Editor
(Before adding Index Sort your Table by Dates if not already sorted)
Now you can get the Cumulative Total using this Index Column
Running_Total with Index = CALCULATE ( SUM ( Table1[Amount] ), FILTER ( ALL ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) ) )
Zubair_Muhammad
8 years agoCommunity Champion
Hi mayurdhote
In that case.
First Add an Index Column to your Table using QUERY Editor
(Before adding Index Sort your Table by Dates if not already sorted)
Now you can get the Cumulative Total using this Index Column
Running_Total with Index =
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( ALL ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) )
)Zubair_Muhammad
8 years agoCommunity Champion
The image below shows the Cumulative Total with and without Index
It is your sample data. I just added one row with same date