title: MDX - distinct count
body: <p>I was following this article:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/aa902637%28v=sql.80%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa902637%28v=sql.80%29.aspx</a></p>
  
  <p>and my query for distinct count looks like this:</p>
  
  <pre><code>Count(CrossJoin({[Measures].[Submission Count]}, [Submission].[PK Submission].Members), ExcludeEmpty)
  </code></pre>
  
  <p>it returns always 1 more than it should (for example it returns 27 instead of 26).</p>
  
  <p>In the same article there is this query (which is suppose to solve this problem):</p>
  
  <pre><code>Count(CrossJoin( {[Sales]}, 
  Descendants([Customers].CurrentMember, [Customer Names])),
   ExcludeEmpty)
  </code></pre>
  
  <p>But I can't get it to work. I've tried these two but second one always returns 1 or 0 while the first one doesn't work (error: I have to explicitly define a level):</p>
  
  <pre><code>Count(CrossJoin( {[Measures].[Submission Count]}, 
      Descendants([Submission].CurrentMember, [Submission].[PK Submission])),
       ExcludeEmpty)
  </code></pre>
  
  <p><br></p>
  
  <pre><code>Count(CrossJoin( {[Measures].[Submission Count]}, 
      Descendants([Submission].[PK Submission].CurrentMember, [Submission].[PK Submission])),
       ExcludeEmpty)
  </code></pre>
  
  <p>Any idea what am I doing wrong?</p>
  
  <p>Thanks!</p>