title: How do I calculate a distinct count of a distinct dimension in Tableau?
body: <p>As seen in the image link below, I am trying to calculate the 3rd column above and add it to my data source.</p>
  
  <p>I understand that it uses the COUNTD (Discrete Count) however I can't get it to work correctly. What calculation would I use to add the 3rd column to my data source using the first and second columns?</p>
  
  <p>I tried { FIX [App] : COUNTD(Rule)} but that's solely returning 1 for every row since it's not aggregating based on the the number of discrete rules for each app.</p>
  
  <p><a href="https://i.stack.imgur.com/8ecIa.jpg" rel="nofollow noreferrer">Click here to view image</a></p>