title: SCD type 2 with parent-child hierarchy aggregation issue
body: <p>We have a staff dimension that has a self-reference for managers (Parent-Child relationship) that we built the hierarchy on it. </p>
  
  <p>DimStaff table:</p>
  
  <pre><code> | SurrogateKey | BusinessKey | Employee Name | ManagerBusinessKey |  StartDate  |  EndDate  |
   |      1       |      1      |   Manager1    |        NULL        |  2013-01-01 | 2099-01-01|
   |      2       |      2      |   Manager2    |        NULL        |  2013-01-01 | 2099-01-01|
   |      3       |      3      |   Employee1   |        1           |  2013-01-01 | 2014-01-01|
   |      4       |      3      |   Employee1   |        2           |  2014-01-02 | 2099-01-01| 
  </code></pre>
  
  <p>Fact Table:</p>
  
  <pre><code> | StaffKey | DateKey  | Measure1 |
   |    3     | 20130405 | 10       |
   |    4     | 20140203 | 20       |
  </code></pre>
  
  <p>Now, with this data set as an example, the requirement is to </p>
  
  <p>1- Be able to drill down through the hierarchy </p>
  
  <pre><code> Manager1
      -&gt;   Employee1  
               -&gt;   Measure1=10
   Manager2
      -&gt;   Employee1  
               -&gt;   Measure1=20
  </code></pre>
  
  <p>2- Aggregate the values for each hierarchy level when one person is selected </p>
  
  <pre><code>Employee1    -&gt;   Measure1=30
  </code></pre>
  
  <p>How can we go about doing that? (the problem is we built it but the second requirement doesn't work because the cube accepts the two states of Employee1 as two separate enities and wont aggregate them.)</p>