title: SSAS MDX WHERE clause syntax - filtering multiple values from the same hierarchy
body: <p>I'm quite new to data warehousing and MDX queries, and I realize that I'm probably not using the MDX syntax properly in the case below.</p>
  
  <p>I'm using <strong>SSAS 2005</strong> on <strong>MS SQL Server 2005</strong> and would like to query my cube and filter the results with multiple members from the same hierarchy (the filtered members are "sibling"), given a specific year ([2013]) and markets breakdown on rows. </p>
  
  <pre><code>WITH
      MEMBER [Measures].[Value] AS Format([Measures].[Expected Sale Price EUR], '#,###')
      MEMBER [Measures].[Pieces] AS Format([Measures].[Line Quantity], '#,###')
  SELECT
      CrossJoin(     
      {[Time].[Calendar Year].&amp;[2013]},
      {[Measures].[Value],[Measures].[Measures].[Pieces]}) 
          ON COLUMNS,
  
      {[Customers].[Markets].Members} 
          DIMENSION PROPERTIES MEMBER_NAME ON ROWS
  FROM [Po System] 
  WHERE ({[Order Type].[Order Type].&amp;[1], 
          [Order Type].[Order Type].&amp;[5], 
          [Order Type].[Order Type].&amp;[6]},
         {[Customers].[Customers].&amp;[1012],
          [Customers].[Customers].&amp;[1922]})
  </code></pre>
  
  <p>The result I get is an aggregation of the measurables for the <strong>whole market</strong> to which those customers belong.</p>
  
  <p>The thing is that if I use only member of the [Customers] dimensions inside the WHERE clause, and only if I don't wrap it with <strong>{ }</strong> brackets, I get the results I want - aggregation of the data  for customer [1012] only, as it should be (verified with my original data source).</p>
  
  <p>Here's an example for a WHERE clause in the same query that gives me the correct results for one customer filtering:</p>
  
  <pre><code>WHERE ({[Order Type].[Order Type].&amp;[1], 
          [Order Type].[Order Type].&amp;[5], 
          [Order Type].[Order Type].&amp;[6]},
         [Customers].[Customers].&amp;[1012])
  </code></pre>
  
  <p>In the query with this WHERE clause I get the proper results, but just for one member.</p>
  
  <p>I constantly verify the integrity of the data in my cube by using the Cube Browser within the BI Development Studio (v. 2005).</p>
  
  <p>I've also looked into the SQL Server Profiler to get the queries generated by the Cube Browser, but those are unreadable and non-executable from the Management Studio, where are run my MDX queries for tests.</p>
  
  <p>Any idea on what's wrong with the syntax I use?</p>