please assist on the below . i have used join tool **join by specific records but it created duplicated rows and when we apply unique tool its deleting 3000 with 25775 (table A) instead of 34058. its giving invalid difference of 8283.
output received :
| Product ID | Quantity | Amount | Distributor | Right_Product ID | Transaction ID | Right_Quantity | sale Amount | Distributor/Agent | Difference |
| 6719 | 10000 | 146843 | LG | 6719 | 110089 | 10000 | 146843 | LGEC | 0 |
| 6719 | 11000 | 25260 | SAMSUNG | 6719 | 123456 | 11000 | 25260 | SAMSUNGEC | 0 |
| 6719 | 3000 | 34058 | LG | 6719 | 220569 | 3000 | 25775 | LGEC | 8283 |
| 6719 | 3000 | 34058 | LG | 6719 | 231589 | 3000 | 34058 | LGEC | 0 |
| 6719 | 6000 | 597 | LG | 6719 | 718956 | 6000 | 597 | LGEC | 0 |
input:
| Table A | | | |
| Product ID | Quantity | Amount | Distributor |
| 6719 | 11,000 | 25,260 | SAMSUNG |
| 6719 | 3,000 | 34,058 | LG |
| 6719 | 10,000 | 146,843 | LG |
| 6719 | 3,000 | 25,775 | LG |
| 6719 | 6,000 | 597 | LG |
| Table B | | | | |
| Product ID | Transaction ID | Quantity | sale Amount | Distributor/Agent |
| 6719 | 123456 | 11000 | 25260 | SAMSUNGEC |
| 6719 | 718956 | 6000 | 597 | LGEC |
| 6719 | 110089 | 10000 | 146843 | LGEC |
| 6719 | 231589 | 3000 | 34058 | LGEC |
| 6719 | 220569 | 3000 | 25775 | LGEC |
Required Output: Difference = Amount - Sale Amount
| Product ID | Quantity | Amount | Distributor | Product ID | Transaction ID | Quantity | sale Amount | Distributor/Agent | Difference |
| 6719 | 11,000 | 25,260 | SAMSUNG | 6719 | 123456 | 11000 | 25260 | SAMSUNGEC | 0 |
| 6719 | 3,000 | 34,058 | LG | 6719 | 231589 | 3000 | 34058 | LGEC | 0 |
| 6719 | 10,000 | 146,843 | LG | 6719 | 110089 | 10000 | 146843 | LGEC | 0 |
| 6719 | 3,000 | 25,775 | LG | 6719 | 220569 | 3000 | 25775 | LGEC | 0 |
| 6719 | 6,000 | 597 | LG | 6719 | 718956 | 6000 | 597 | LGEC | 0 |