title: How to check, which hierarchy is being used
body: <p>I have 1 dimension Data with 2 hierarchies: Gregorian Calendar, Planning Calendar.
  [Gregorian Year] - [Gregorian Month] - [Gregorian Day]
  [Planning Year] - [Planning Month] - [Planning Day]
  I have 2 MDX measures:</p>
  
  <pre><code>[Planning Stock] = Sum(PeriodsToDate([Data].[Planning Calendar].[(All)]), [amount])
  
  [Gregorian Stock] = Sum(PeriodsToDate([Data].[Gregorian Calendar].[(All)]), [amount])
  </code></pre>
  
  <p>How to create one measure that will recognize the hierarchy?
  I wrote something like that, but it does not work :(</p>
  
  <pre><code>iif(([Data].currentmember.level is [Data].[Planning Calendar].[(All)]),
  (Sum(PeriodsToDate([Data].[Planning Calendar].[(All)]), [amount])),
  (Sum(PeriodsToDate([Data].[Gregorian Calendar].[(All)]), [amount]))
  )
  </code></pre>
  
  <p>Do you have any ideas?</p>