title: SSRS subtotal of row group and column group in matrix using InScope?
body: <p>I am having trouble calculating a % of a parent row group within a column group, the expected result is like that below.</p>
  
  <p><a href="https://i.stack.imgur.com/iYtcG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iYtcG.png" alt="enter image description here"></a></p>
  
  <p>The percentage of column group is straight forward using the expression:</p>
  
  <pre><code>=Sum(Fields!Total.Value) / Sum(Fields!Total.Value, "LocationGroup")
  </code></pre>
  
  <p>Though I can't get an expression to work that would provide the subtotal for the intersection of <code>LocationGroup</code> and <code>CategoryGroup</code>.</p>
  
  <p>I have acheived the desired results by modifying my dataset to calculate the subtotal using a <code>Window Function</code> in <code>TSQL</code> though I feel that this should also be achievable using an expression.</p>
  
  <p>I've come across numerous articles that mention the <code>InScope</code> function though I haven't got this to work as expected.</p>