Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Cumulative sum Column

Hello Everyone!   I have a table like this, with the sales each week, i want to calculate a cumulative sum for each month.  The table has sales for each month: I have the table like this:    ...
  • ryan_mayu's avatar
    5 years ago

    Anonymous 

    you can create a column

    Column = CALCULATE(sum(Sheet6[ Sales Week]),FILTER(Sheet6,Sheet6[Period]=EARLIER(Sheet6[Period])&&Sheet6[Week]<=EARLIER(Sheet6[Week])))

    please see the attachment below

  • ryan_mayu's avatar
    ryan_mayu
    5 years ago

    Anonymous 

    please try this

    Column = CALCULATE(sum(Sheet6[ Sales Week]),FILTER(Sheet6,Sheet6[Period]=EARLIER(Sheet6[Period])&&Sheet6[Week]<=EARLIER(Sheet6[Week])&&'Sheet6'[Product]=EARLIER(Sheet6[Product])))