Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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 |
Solved! Go to Solution.
Please try this column
Column =
CALCULATE (
SUM ( Table1[amount] ),
FILTER (
ALLEXCEPT ( Table1, Table1[Name] ),
Table1[Date] < EARLIER ( Table1[Date] )
)
)
Please try this column
Column =
CALCULATE (
SUM ( Table1[amount] ),
FILTER (
ALLEXCEPT ( Table1, Table1[Name] ),
Table1[Date] < EARLIER ( Table1[Date] )
)
)
Yes, it works. Thanks.
| User | Count |
|---|---|
| 50 | |
| 41 | |
| 32 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |