Hi team,
I am currently working on the workflow. The rule is to sum the price for the same transaction number and for the same order number. Negative prices indicate a return. Do you have any suggestions on how to do this?
The data is below.
| transaction number | order number | price |
| 1 | A | 5 |
| 1 | B | 6 |
| 1 | C | 3 |
| 2 | A | 1 |
| 3 | D | 3 |
| 3 | E | 2 |
| 4 | F | 1 |
| 5 | G | 2 |
| 6 | G | -4 |
| 7 | H | 5 |
The result is below:
| transaction number | order number | price | SUM |
| 1 | A | 5 | 15 |
| 1 | B | 6 | 15 |
| 1 | C | 3 | 15 |
| 2 | A | 1 | 15 |
| 3 | D | 3 | 5 |
| 3 | E | 2 | 5 |
| 4 | F | 1 | 1 |
| 5 | G | 2 | -2 |
| 6 | G | 4 | -2 |
| 7 | H | 5 | 5 |
Thanks,
Jocelyn