Forum Discussion

desiiirz's avatar
desiiirz
Regular Visitor
3 years ago

Cumulative Sales

Hello,

 

I want a new column that calculate the cumulative sales A.K.A (nombre de rdv créés) 

 

I come up with the formula below but it calculate me the cumulative sales for each S01, S02, S03 ect...

My ideal result looks like this : 

 

Column A                

Line 1 : 20                

Line 2 :  50

Line 3 : 10

 

Column running total : 

Line 1 : 20                

Line 2 :  70

Line 3 : 80

 

and so on

6 Replies

    • desiiirz's avatar
      desiiirz
      Regular Visitor

      FreemanZ  hi, 

       

      there is no unique value beside "nombre de rdv créées" where there is a lot of 0 value.

      Right now, it calcule the cumulative sales for each S01 then S02 ect...

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi desiiirz 

    You can add an index column in power query

    Then create a new column in table.

    Running toal = CALCULATE(SUM(RegN[Nombre de ]),FILTER(RegN,[Index]<=EARLIER(RegN[Index])))

    Output

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.