title: SSAS (looking for mdx measure) count distinct customer in a category at a date
body: <p>I have just implement a SSAS structure which deals with customer and newsletter subscription.</p>
  
  <p>I'm dealing with a kind of simple issue that I do not solve at now..</p>
  
  <p>Here is an simple extract of one of my fact table :</p>
  
  <p>Date    |   cat     |   Contact</p>
  
  <p>201401  |   noSub   |   Paul<br>
  201403  |   Multi   |   Paul<br>
  201602  |   Mono    |   jean<br>
  201604  |   Mono    |   Paul<br>
  201604  |   Multi   |   Paul<br>
  201609  |   noSub   |   jean<br>
  201703  |   Multi   |   Paul    </p>
  
  <p>I want to get a measure (contactNumber) which gives me how many Contact there are within a category at the time of the request..</p>
  
  <p>I create this measure : (DC_Contact is a Count distinct of contact)</p>
  
  <p><code>[Measures].[ContactNumber] = 
      AGGREGATE( 
          NULL : [Period].[Per Quarter].CURRENTMEMBER
          ,[Measures].[DC_Contact])</code></p>
  
  <p>but when I check it in 201703, it gives me 
  <code>
  noSub = 2 (excepted 1)
  Multi = 2 (excepted 1)
  Mono = 2 (excepted 0)</code></p>
  
  <p>And in 201604   I will have
  <code>
  noSub = 2 (excepted 2)
  Multi = 1 (excepted 0)
  Mono = 1 (excepted 0)</code></p>