title: Visual Studio SSRS - Count with a Group
body: <p>Im trying to figure out an Expression in SSRS.</p>
  
  <p>I have 1000s of account details in a DB.</p>
  
  <p>What i want to do is create a table that gives a count of members in each state like :</p>
  
  <pre><code>State        Members
  
  AK            234
  
  AL           654
  
  AR           643
  </code></pre>
  
  <p>How do i add a subgroup to this expression</p>
  
  <pre><code>=CountDistinct(Fields!Agent_External_ID.Value)
  </code></pre>
  
  <p>Right now it results in the same person being counted twice as the state is not grouped.</p>