1 - I need to show the real value for "f" and only when summing it up it will be -60
I think this is my main problem.
It is a P&L report and they wish to see all the accounts as they appear and when grouped, it should use the weight. Sp for accountID 2 children it should show the "real" value of that branch b=20, f=60,g=70
but when showing whithout its children it should show the calculated sum using the weight (same goes for grandchilds and grand-grandchilds etc...)
2 - for account 2 you are correct, but for acount 5 I would expect 5 -> 4 -> 1, 2(->6,7), 3 (tree+ 3 levels)