I have one data set as below
final result should be like below. each deal should get the accumulated Debit and credit based on it's parent deal id.
If there are accepted answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.