title: Group on sum of distinct values in Tableau
body: <p>I'm using Tableau 8.3 and i'm trying to find out how to group on each of the values that I find after making a "count of distinct values".</p>
  
  <p>To illustrate the case I have made a fictive dataset which includes 58 rows (buys), 7 different IDs (customers) and 5 different products. Then I have made a count distinct to find out how many of the 5 different products each ID have bought. It looks like this.</p>
  
  <p><code>ID1 = 4</code><br>
  <code>ID2 = 4</code><br>
  <code>ID3 = 5</code><br>
  <code>ID4 = 4</code><br>
  <code>ID5 = 3</code><br>
  <code>ID6 = 4</code><br>
  <code>ID7 = 2</code>    </p>
  
  <p>Now I want to turn the view around and find out how many of the IDs who have bought X different products. It should ultimately look like this.</p>
  
  <p><code>2 = 1</code><br>
  <code>3 = 1</code><br>
  <code>4 = 4</code><br>
  <code>5 = 1</code></p>
  
  <p>Hope to find a solution by posting here! Thank you,</p>
  
  <p>Mikael</p>