Summed value of values in current record and previous record
Couldn't find anything on the internet on this, but perhaps i'm not using the right keywords. An example of what i want:
Record 1: value a = 10, value b = 5, value c = a - b (so value c = 5)
Record 2: value a = 3, value b = 2, value c = value c from record 1 + a - b (so value c here is 5 + 3 - 2 = 6)
The starting value of value c = 0, and then for each subsequent record it need to take into account the previous record's value. Much like in excel is done often te keep a 'saldo' of something, for example the cash machine in a shop. When in this case the starting value is zero, then on the first day (record 1) 10 euros is sold and 5 euros is spent, so after day one, there is 5 euros left. Then on the second day 3 euros is sold and 2 euros is spent, so the accumulated value is now 6.
Any help is appreciated.