title: MDX query with count distinct filtered on another measure, that plays with other filters
body: <p>in the SSAS AdventureWorks schema, I'm trying to figure out a distinct count of how many distinct customers have made Internet orders greater than $1000.</p>
  
  <p>I attempted to make an MDX query like this, and it seems to <em>almost</em> work, except that new measure seems to ignore the slicer axis / <code>WHERE</code> condition, showing the count of customers for <em>all</em> countries, not just Australia:</p>
  
  <pre><code>With 
  member [measures].[DistinctCustomersHighSales] as 
  distinctcount(
     filter([Customer].[Full Name].Members, [Measures].[Internet Sales-Sales Amount] &gt; 1000)
  )
  SELECT {
     [Measures].[Internet Sales-Sales Amount],
     [Measures].[DistinctCustomersHighSales]
      }
   on columns,
  ([Date].[Calendar Date].[Calendar Year].Members) on rows
  FROM [Analysis Services Tutorial]
  WHERE [Customer].[Customer Geography].[Country-Region].[Australia]
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>If I were doing this in SQL, I would be looking for something like this</p>
  
  <pre><code> SELECT Year(OrderDate) as year,
       sum(SalesAmount) 
       count(case when count(distinct case when SalesAmount &gt; 1000 then dc.customerkey end)
   FROM dbo.FactInternetSales  fis
      join dbo.dimcustomer dc on fis.CustomerKey=dc.CustomerKey
      join dbo.DimGeography  dg on dc.GeographyKey=dg.GeographyKey
   WHERE EnglishCountryRegionName='Australia'
   GROUP BY year(OrderDate)
   ORDER BY year
  </code></pre>