title: Power BI - How do I count the number of times a value appears in relation to a separate column?
body: <p>I'm trying to produce a report in Power BI to count the number of groups an individual belongs to.  I have a table with users, security groups they belong to, etc.</p>
  
  <p>I'm looking to query the data to help track down users that don't belong to at least two security groups.  In my environment every user should be in an All Staff security group plus any other unique group they belong to.</p>
  
  <p>The image I've included has exactly what I'm looking for.  I currently don't have that Total column.  This is what I need help with.  I have the Users and all of the groups they belong to.</p>
  
  <p>Here's a picture of what I'm trying to achieve:</p>
  
  <p><a href="https://i.stack.imgur.com/cWJSD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cWJSD.png" alt="enter image description here"></a></p>
  
  <p>I've tried the Countrows command with a filter but I couldn't get it to filter based on the number of groups users belong to.</p>
  
  <p>I can't simply count the number of times a user's name appears either because this table is a lot bigger than just my example above.  This is just an extra feature I'm hoping to achieve out of my table - using the analytics of my report to help find group membership issues and resolve them.</p>