To help users solve your problem, could you please post a packaged workbook which contains the sample data you've built to produce the above image. Doing this saves people time in having to simulate the data for themselves and also reduces any assumptions or other quirks with the data you've got. Please refer to the Required Reading section on this page Getting Started in the Forums to understand how to do this.
Also, please note, I have moved this post into the main Forums section of the site where it is likely to attract more attention.
I'm adding one more thing to what Donna wrote - what do you want the final view to look like? Is it just the transaction ID and the final sum for each or something else?