Table Formula - Cumulative Quantity by Partition
SQL PARTITION BY:
SUM(Quantity) OVER (PARTITION BY Code Column ORDER BY Index Column) AS CUMULATIVE QUANTITY
For each matching Code Column row value, output a running total of the quantity associated to the code. Sort the result by the Index column.