You can look into Window Functions which do exactly that. They are table calculations on top of table calculations. Table Calculation Functions The window functions are at the bottom.
It appears that you will have this dead account run across and then you will want the window function to run down so as to pick up all the test accounts values for dead account, etc?
This can work at the accoount level, but not at the grand total level.
The problem here as far as I see is that the first calculation should be done at the account level
and then the secound calculation should be done at the grand total level
Any Hacks Available ?