title: SSRS Expression to count the distinct number of items visible
body: <p>Currently I'm using this expression in a cell above the column headers of a table:</p>
  
  <p><code>= "Num Days " &amp; CountDistinct(Fields!Date.Value)</code></p>
  
  <p>In the report designer this is the context of the expression:</p>
  
  <p><img src="https://i.stack.imgur.com/j5e5Q.png" alt="enter image description here"></p>
  
  <p>Here is what the result looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/9GJqE.png" alt="enter image description here"></p>
  
  <p>The expression is working ok i.e in the data set there are 60 distinct dates which is what the expression returns. However there is a filter on the group (Date2) so that it only has 10 visible days in the tablix.</p>
  
  <p>How do I amend the expression to return just the dates that are visible?</p>