Forum Discussion

informes_pbi's avatar
informes_pbi
Regular Visitor
3 years ago

Subtotal accumulate sum

I would like to know how to obtain the cumulative sum between cells with positive values, resetting each time a new positive value is encountered.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello, 

    You can try following measure to get the Running Total for your data. 

    RT =
    VAR lastWeek = MAX(Data[Week])
    RETURN
    CALCULATE(SUM(Data[Values]), Data[Week] <=lastWeek)



     

    If this solves your problem, please give thumbs up and mark it as a solution.