title: MDX ParallelPeriod with multiselect date values in excel 2010 pivot table
body: <p>I have created a calculated measure via <code>"New Calculated Member"</code> in a Visio Studio 2010 cube project</p>
  
  <p>The expression is as follows:</p>
  
  <pre><code>[Measures].[Extended Price],
  PARALLELPERIOD([Dim Calendar].[RetailCalendar].[Retail Year], 1,[Dim Calendar].[RetailCalendar].currentmember)
  </code></pre>
  
  <p>This uses the Dim Calendar hierarchy RetailCalendar:</p>
  
  <pre><code>Retail Year,
  Retail Quarter,
  Retail Month,
  Retail Week,
  Retail Day
  </code></pre>
  
  <p>When using this measure, Sales LY, in an Excel 2010 pivot table, it works as long as only one member of the date hierarchy is select.</p>
  
  <pre><code>eg. Retail Year 2016 only
  eg. Retail Week 2016 24 only.
  </code></pre>
  
  <p>How can I write this calculation so that it allows multiple dates selected?</p>
  
  <p>After searching for solutions, I got as far as:</p>
  
  <pre><code>aggregate
  (
      Generate(
          existing [Dim Calendar].[RetailCalendar].[PK Date].members,
          (PARALLELPERIOD(
              [Dim Calendar].[RetailCalendar].[Retail Year], 1,[Dim Calendar].[RetailCalendar].currentmember
              )
          )
      ,[Measures].[Extended Price])
  )
  </code></pre>
  
  <p>which results in <code>null</code></p>