title: MDX query producing #Error as output
body: <p>In my SSAS Cube, I have a measure called [Sales Total]. What I want to do is to create another measure that would give me the lowest sales figure in the last 6 months. I want this to be a <strong>moving minimum</strong>, calculated as the min of sales of every time period from the present month to 6 months back.</p>
  
  <p>I wrote my MDX statement but it produces an error and I have hard time trying to figure out why. It is something to do with aggregating Date dimension members into a filter aggregate.  </p>
  
  <p>When i choose a single month member from the Date hierarchy, it returns the correct value. When I select multiple members from the hierarchy, as seen below, it errors out.</p>
  
  <p>Any kind of help is appreciated.</p>
  
  <pre><code>WITH 
  MEMBER [Measures].[Min Sales Total Rolling 6 months] as '(MIN([Date].[Fiscal Month Hierarchy].currentmember.lag(6):[Date].[Fiscal Month Hierarchy].currentmember,[Measures].[Sales Total]))'
  MEMBER [Date].[Fiscal Month Hierarchy].[FilterAggregate] as 
  'AGGREGATE({
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20141].&amp;[201310],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20141].&amp;[201311],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20141].&amp;[201312],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20142].&amp;[201401],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20142].&amp;[201402],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20142].&amp;[201403],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20143].&amp;[201404],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20143].&amp;[201405],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20143].&amp;[201406],
  [Date].[Fiscal Month Hierarchy].[Quarter].&amp;[20144].&amp;[201407]
  })'
  SELECT {
  [Measures].[Min Sales Total Rolling 6 months]} ON AXIS(0)
  FROM [My Cube]
  WHERE ([Date].[Fiscal Month Hierarchy].[FilterAggregate])
  </code></pre>