Forum Discussion
Issue with Running Total
- 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] ) ) )
In your scenario, only Data column contains unique values, so you should apply filter on Date column.
Running Total Amount = CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),Table1[Date]<=MAX(Table1[Date])))
Regards,
- mayurdhote8 years agoRegular Visitor
Thanks v-sihou-msft !
But what if in above scenario, date column does not have unique values?- Zubair_Muhammad8 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_Muhammad8 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