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
Solved! Go to Solution.
@Jocelynupup can you explain the calculation for transaction no 2?
Sure. that's also the biggest challenge for me.
The order number of transaction number 2 is A, which is the same as transaction number 1. So sum=5+6+3+1=15
transaction number | order number | price | SUM |
1 | A | 5 | 15 |
1 | B | 6 | 15 |
1 | C | 3 | 15 |
2 | A | 1 | 15 |
@Jocelynupup I think this does what you want
@Jocelynupup haha, sorry, it took a little tweaking. But I think I finally got the final solution you are looking for!
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |