title: To calculate the average of Latest 12 weeks
body: <p>I figured out how to calculate the average of latest 12 weeks volume in my data. But lets say the current year does not have 12 weeks, it only has 8 weeks then I want to take the remaining 4 weeks from the previous year to make it 12?</p>
  <p>This is how my avg mdx query looks like:</p>
  <pre><code>Avg(
     LastPeriods(
        12,
        Tail(
           NonEmpty(
              [Time].[Week].[Week].Members,
              [Measures].[Vol ( Cases)]
           ),
           1
        ).Item(0)
     ),
     [Measures].[Vol ( Cases)]
  )
  </code></pre>