Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accumulated values (months before) for reduction of current month

I have a problem with accumulation and reduction. It's hard to explain, but I've done my best in the table below. The dimensions used are Client and Closure Date. The values I get from the load script are Consumption and Produced, the rest needs to be calculated somehow.. The most important columns are the 2 last, the other are just there for explaining the problem..

ClientConsumption closure dateConsumptionPossible reduction (80% of   Consumpt.)Produced (for reduction)Reduction this monthLeft after reduction this monthActual reduction incl. Acc.Acc. Reduction left for use
68
5832442010-10-01814651541541054168
5832442010-09-018396715975970671178
5832442010-08-0179763867663838638252
5832442010-07-01752602815602213602213
5832442010-06-0174359451151105110

Please help me figure this out before I throw my pc out the window! 🙂

1 Reply
Not applicable
Author

To clerify..
The produced should be taken from the comsumption, but not more then 80% (the rest will be added to balance for use the next month and so on..). If production doesn't fill the 80% of consumption, then the balance will not be affected at all, however if there is a saved balance it will be added to production to fill up as much as possible of the 80%.