calculate running balance?
Content
I'm trying to get a report to compile a running balance.
I have custom fields to capture all the data, and I know I need a custom script for the calculation, but I'm not sure how to write it.
My columns are:
Month; Total hours; Hours Used, Balance Remaining
The Balance Remaining is where I am stuck. Below is an example of what I want to build.
Balance remaining = Previous Balance Remaining - Hours used
where each new row balance is calculated on the previous balance.
Month | Total Hours | Hours Used | Balance Remaining | |
Jan | 500 | 40 | 460 | |
Feb | 500 | 20 | 440 | |
Mar | 500 | 60 | 380 | |
April | 500 | 75 | 305 |
Any help with the script is much appreciated.
Tagged:
2