To recreate your scenario, I created a collection:
ClearCollect(SalesCollection, {productcode: "AAA", qty: 1}, {productcode: "BBB", qty: 5}, {productcode: "AAA", qty: 5}, {productcode: "BBB", qty: 5})
The collection looks like this:

Now, on a button's OnSelect property, I have the following formula:
ClearCollect(FinalResult1, DropColumns(AddColumns(GroupBy(SalesCollection, "productcode", "qty"), "Qty", Sum( qty, qty)),"qty"))
Using this, my collection FinalResult1 looks like this (Qty is the name I gave to the new column):

Let me know if this doesnt work for you.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hardit(Haman)