title: MDX: get attribute from a slowly changing dimension in a cell
body: <p>I need to build a report that shows day-to-day changes in the cube. E.g. for account we show the balance on day X and balance on day Y. I achieve it with something like this:</p>
  
  <pre><code>WITH
  MEMBER OldBalance AS ([Balance], [Date].[Date].[2013-05-01]) -- start date
  MEMBER NewBalance AS ([Balance], [Date].[Date].[2013-05-04]) -- end date
  SELECT {OldBalance, NewBalance} ON COLUMNS
  [Account].[AccountNumber].[AccountNumber] ON ROWS
  FROM TheCube
  </code></pre>
  
  <p>This shows two columns for each account, everyone's happy:</p>
  
  <pre><code>        OldBalance   NewBalance
  ACT123   1050.25        1048.29
  ACT345    950.08        1421.92
  </code></pre>
  
  <p>In addition to account number, [Account] dimension also has SalesRepName as an attribute, and the value of SalesRepName may change over time, making [Account] a slowly changing dimension. What I want to see is something along the lines of:</p>
  
  <pre><code>        OldBalance   NewBalance  OldSalesRep  NewSalesRep
  ACT123   1050.25        1048.29  John Smith   John Smith
  ACT345    950.08        1421.92  John Smith   George Fisher
  </code></pre>
  
  <p>But I have no idea how to achieve this in MDX, and whether it is even possible. </p>