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.
You can achieve this by doing all your calculations in a stored procedure and access that stored procedure in a Data Set of type "SQl Stored Procedure Query"