Hi Experts
Can you please help me with below problem.
I have some transaction data consecutive and I need to find out which rows consitute the total sum. Below the example:
ID Total Transaction Counter
1 20 3 1
1 20 7 2
1 20 5 3
1 20 5 4
1 20 8 5
1 20 1 6
2 30 10 1
2 30 10 2
2 30 12 3
2 30 8 4
2 30 2 5
I need to output the transactions which adds to the total sum. Consider the data is sorted by date and I would only need the most recent. My output should be below:
ID Total Transactions Counter
1 20 3 1
1 20 7 2
1 20 5 3
1 20 5 4
2 30 10 2
2 30 12 3
2 30 8 4
Transactions would be consecutive only, but range has to be decided based on the calculation. Can you please help me with the hints or solution.
Thanks