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] ) )
)WSCTech
3 years agoFrequent Visitor
Hi Zubair,
I know this is an old post, but I tried to replicate your solution but it seems I'm getting repeated values in my running total column. See snapshot below: