title: individual day calculations ,in MDX, with Start and End date in fact table
body: <p>I have a ssas cube with the fact table containing:</p>
  
  <ul>
  <li>FactID</li>
  <li>Status</li>
  <li>StartDate</li>
  <li>EndDate</li>
  </ul>
  
  <p>the dates are linked to a date dimension (status to the status dimension).</p>
  
  <p>Im trying to get a report that shows the amount of facts at a status on each day over a two week period, eg:</p>
  
  <pre><code>         01 May 2011, 02 May 2011, 03 May 2011 etc...
  status1          300          310          320    ...
  status2          250          240          265    ...
  status3          125          546          123    ...
  </code></pre>
  
  <p>I can obtain the data for a single day using the following:</p>
  
  <pre><code>select 
  {
   [TOTAL NUMBER FACT]
  } on 0  
  
  ,{
  descendants([DIM STATUS].[STATUS DESCRIPTION])
  } on 1
  from [DW_CUBE]
  WHERE   
  ([DIM HISTORY START DATE].[YEAR MONTH DAY].FirstMember:[DIM HISTORY START DATE].[YEAR MONTH DAY].&amp;[20110501], 
   [DIM HISTORY END DATE].[YEAR MONTH DAY].&amp;[20110501]:[DIM HISTORY END DATE].[YEAR MONTH DAY].LastMember)
  </code></pre>
  
  <p>but do i get this working for more than a single day?</p>
  
  <p>Many many thanks</p>