If the basic problem is that you're currently seeing
SUM (A) / SUM (B)
and you want to see
SUM (A/B)
then a measure expression should be able to be used to do that.
As far as what the expression should be, I'll leave that to you to determine. If you google the terms you will find a multitude of examples.
Steve.