I have a task, and it's children. Now each child is having an amount and a estimate, which is a said percentage of the amount. So for example, if I have an amount of 100 and an estimate of this amount over 10% is 110.
So I want to calculate the sum of amount of the parent, as well as the estimate, which is quite easy, just add the numbers, for each child.
How do I get an aggregate percentage of the parent though?
eg:
parent1
child1 => 100 - 10% - 110 child2 => 200 - 20% - 240
Now in this case the parent's record will become 300 - x - 350.
I want a formula to find x here. I know it can be found out using 350 and 300, but assuming there are n percentages, how can I calculate the aggregate percentage using all these child percent?