Accumulative sum in a view

Accumulative sum in a view

Hi everyone.

I want to have a column in a view that shows the accumulative sum of another column in every row. In excel I often do that using a formula, like this:

          B1= A1  

          B2=+B1+A2

          B3=+B2+A3

         and so on

 

I want to have a ledger account like view, actually

 

How can I do that in zc?