title: How to filter measure in the Filter function by multiple items from the same hierarchy
body: <p>I am creating an application that generates <code>MDX</code> queries. I stuck with implementing a scenario when the user uses the <a href="https://msdn.microsoft.com/en-us/library/ms146037.aspx" rel="nofollow">Filter</a> function and, in the logical expression, the user wants to slice a measure by multiple members from the same hierarchy.</p>
  
  <p>Here is a real example: there is a cube <strong>Education</strong> with the following dimensions and measures</p>
  
  <ul>
  <li><strong>Dimensions</strong>: Student, School Year</li>
  <li><strong>Measures</strong>: Student Attendance, Student Infractions</li>
  </ul>
  
  <p>The user wants to see Student Attendance of students that had one or more Student Infractions in school year 2010 and 2011.</p>
  
  <p>I need to accomplish this using the Filter function so I wrote the query below </p>
  
  <pre><code>SELECT [Measures].[Student Attendance] ON COLUMNS
  FROM (
    SELECT 
      FILTER(
          [Student].[Student].[Student].Members, 
            (
              [Measures].[Student Infractions], 
              AGGREGATE(
                  {
                    [School Year].[School Year].&amp;[2010]
                   ,[School Year].[School Year].&amp;[2011]
                  }
              )
            ) &gt; 1
      ) ON COLUMNS
    FROM [Education]
  )
  </code></pre>
  
  <p>The problem is that when this query gets executed, it throws 
  <code>'Query (4, 55) The Tuple function expects a tuple set expression for the 2 argument. A string or numeric expression was used.'</code></p>
  
  <p>It looks like it is impossible to use the <a href="https://msdn.microsoft.com/en-us/library/ms145524.aspx" rel="nofollow">Aggregate</a> function inside the Filter function. Is there any way how to get the query working?</p>