Forum Discussion
MiaZhao
8 years agoHelper I
Cumulative total based on a date column
Hi everyone,
How to calculate a cumulative sum based on the date column? For example, how to calculate the Total in the following table?
| Name | Date | amount | Total | |
| A | 1.1 | 1 | 0 | |
| A | 1.2 | 2 | 1 | |
| A | 1.3 | 3 | 3 | =1+2 |
| A | 1.4 | 4 | 6 | =1+2+3 |
Please try this column
Column = CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALLEXCEPT ( Table1, Table1[Name] ), Table1[Date] < EARLIER ( Table1[Date] ) ) )
2 Replies
- Zubair_MuhammadCommunity Champion
Please try this column
Column = CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALLEXCEPT ( Table1, Table1[Name] ), Table1[Date] < EARLIER ( Table1[Date] ) ) )- MiaZhaoHelper I
Yes, it works. Thanks.