Forum Discussion

ShemRo's avatar
ShemRo
Regular Visitor
4 years ago
Solved

Cumulative Sum not working??

Hi There, I have the below dataset. I am wanting to calculate a cumulative total of the act column. I am making a mistake in my calculated column somwhere in the code: Cumulative_Act_Hours_C...
  • VahidDM's avatar
    VahidDM
    4 years ago

    Oh Ok.

    Have you tried this:

    Cumulative_Act_Hours_Col =
    CALCULATE(
    SUM( 'Table'[act] ),
    FILTER( ALL( 'Table' ), 'Table'[MonthYear] <= EARLIER( 'Table'[MonthYear] ) )
    )

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/