How do I implement this?
I need the sum of all the values from the PPLAN column, and from this sum I need to subtract the PPLAN value.
Assume the entire amount = 89 473,79 .
The first line will be the value 89473,79 - 2182,29 = 87291.5 ,
the second will be 89473,79 - 2182,29 - 2182,29 = 85109.21
etc., until it is already at the end of 0 .
The number of lines is always different, because it usually depends on the period of months, maybe 20 or 40, for example. Therefore, I decided to build on the entire amount.
How can I put a counter? Or is the logic of solving the problem itself incorrect?
