You can't use master measures as if they are variables. The measures only make sense in the context of the object they're used. What you want instead is variables and use those. In Qlik Sense 2.1 you can create variables in the user interface. In older versions you need to create them in the script.
SET vTotalAmount = sum(Amount);
SET vTotalQty = sum(Qty);
LET vAverage = '$('& 'vTotalAmount)/$(' & 'vTotalQty)';
You can then use the variables in the measures: