 <p>You should be able to do this natively in SSRS.</p> <p>I've used your data:</p> <p><img src="https://i.stack.imgur.com/gcJSZ.png" alt="enter image description here"></p> <p>And created a Tablix:</p> <p><img src="https://i.stack.imgur.com/cvLe5.png" alt="enter image description here"></p> <p>I based this off a Matrix initially, but removed the row group - you can see that only grouping is the <code>Account</code> column.</p> <p>The <strong>Withdrawal Ratio</strong> expression is just:</p> <pre><code>=Sum(Fields!Withdrawals.Value) / Sum(Fields!Deposits.Value) </code></pre> <p>Compared to your example I'm not specifying a scope for the aggregate - since this gets executed in both the column scope (i.e. Account) and the total scope this will give the required results in each section:</p> <p><img src="https://i.stack.imgur.com/Tnarr.png" alt="enter image description here"></p> <p>Once the grouping for the Tablix is set up correctly everything else should follow.</p>