Why do you want a calculated column rather than a simple SUM([QUANTITY]) measure that is automatically filtered by its context in a pivot table?