title: SSAS 2012 How to use ParallelPeriod without Date Hierarchy?
body: <p>I found an example of how to use the Parallel Period function in my SSAS OLAP Cube here: <a href="https://www.mssqltips.com/sqlservertip/2915/sql-server-analysis-services-period-over-period-variance-analysis/" rel="nofollow">https://www.mssqltips.com/sqlservertip/2915/sql-server-analysis-services-period-over-period-variance-analysis/</a></p>
  
  <p>However it assumes that you have a Date Hierarchy, which I don't. I tried using it without success. My Date Dimension only has a date attribute and a Year Month attribute (ex: 2015/01 for January 2015). It has no hierarchy nor anything else.
  (Interested why? Because it just works, and a hierarchy confused my users) </p>
  
  <p>I need to compare values month over month and year over year. 
  This is what I could infer with the example, but it is not working:</p>
  
  <pre><code>IIF([Fact Date].[Date].CurrentMember.level.ordinal = 0, 
      [Measures].[Billed Amount],
      (ParallelPeriod([Fact Date].[Year Month].[Year Month],
                      1,
                      [Fact Date].[Date].CurrentMember),
       [Measures].[Billed Amount]
      )
  )
  </code></pre>
  
  <p>What would be the correct syntax to achieve this?</p>