Newbie question. I have a dataset that I am using to calculate some accounting values. The dataset looks like this
ID Period Amount Interest Opening_Bal Closing_Bal
1 1 1234 0.07 1234 (1234+(1234*0.07)) = 1321
1 2 1244 0.07 1321 (1321-1234+(1321*0.07))
1 3 .....
2 1 ......
...
Please ignore the actual values in the table. What I have at the moment is the first row for each ID. I need to create a loop for each ID group so that from period 2 onwards, it calculates the closing balance as per the formula in the second row. Any ideas?