Forum Discussion

Ubaid ur Rahman's avatar
Ubaid ur Rahman
Copper Contributor
Mar 28, 2019
Solved

Excel Cumulative Sum

I need to cumulate incrementing values down.

Please see the attached file for better explanation.

 

Thank you in advance!

SergeiBaklan 

  • SergeiBaklan's avatar
    SergeiBaklan
    Mar 28, 2019

    Ubaid ur Rahman , I tried to do that on your data model, but didn't catch what do you calculate in it. Thus emulate on the table

    It is named as Range in data model, the measure will be

    CumulativeCountDifd:=CALCULATE (
        SUM ( [Actual value] )/COUNTROWS(Range),
        FILTER ( ALLEXCEPT ( Range, Range[Year] ), Range[Month] <= MAX ( Range[Month] ) )
    )

    You may it in Power Pivot and result is in second sheet.

9 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    For cumulative sum, the formula is:
    =SUM(B$4:B4)
    For cumulative average, as what it seems you need, the formula is:
    =AVERAGE(B$4:B4)
    • Ubaid ur Rahman's avatar
      Ubaid ur Rahman
      Copper Contributor

      SergeiBaklan 

       

      please see the picture in attachment. I want to perform that incrementing cummulative action in pivot in the red marked area.

       

      Thanks in advance

    • Ubaid ur Rahman's avatar
      Ubaid ur Rahman
      Copper Contributor
      Hi Baklan,
      thanks for your quick reply. I got this but what the real problem is how to perfrom this action in Pivot table. I have a month coulumn form 1 to 12. Then in second column I have an average of some numbers repeating monthly. in the third I want to perform the above action.

Resources