Forum Discussion

MiaZhao's avatar
MiaZhao
Helper I
8 years ago
Solved

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   ...
  • Zubair_Muhammad's avatar
    8 years ago

    MiaZhao

     

    Please try this column

     

    Column =
    CALCULATE (
        SUM ( Table1[amount] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[Name] ),
            Table1[Date] < EARLIER ( Table1[Date] )
        )
    )