title: OLAP MDX calculating percentages displays first member instead of average
body: <p>I am calculating percentages in Analysis Services 2008 using MDX by dividing the sum by the count</p>
  
  <pre><code>= IIF ([Measures].[STAT VALUE Count]=0,NULL,([Measures].[STAT VALUE]/100)/[Measures].[STAT VALUE Count])
  </code></pre>
  
  <p>My grain is at the hourly level and is a percentage value itself</p>
  
  <p>When browsing the cube and applying a Time dimension hierachy of year - quarter - month - day the values that display are the first member. Not the average percentage of the underlying values</p>
  
  <p>How can i change my mdx statement so that the value i see when browsing is the average  of the underlying values.
  At year i want to see the average percentage of the underlying values, as i drill down to quarter i expect to see the average percentage for that quarter, then at the month etc etc.</p>
  
  <p>I admit to being a relative beginner when it comes to MDX</p>