title: Calculated Member for Cumulative Sum
body: <p>First some background: I have the typical Date dimension (similar to the one in the Adventure Works cube) and an Account dimension. In my fact table I have daily transaction amounts for the accounts.</p>
  
  <p>I need to calculate cumulative transaction amounts for different accounts for different periods of time. The catch is that whatever is the first period shown on the resulting report should get its transaction amount as-is from the fact table and all the following periods in the report should have cumulative amounts.</p>
  
  <p>For example, I might have a single account on rows and on columns I could have [Date].[Calendar].[Calendar Year].[&amp;2005]:[Date].[Calendar].[Calendar Year].[&amp;2010]. The transaction amount for 2005 should have the sum of transaction amounts that took place in 2005 for that specific account. For the following year, 2006, the transaction amount should be TransactionAmountsIn2005 + TransactionAmountsIn2006. Same goes for the remaining of the years.</p>
  
  <p>My problem is that I don't really know how to specify this kind of calculated member in the cube because the end-user who is responsible for writing the actual MDX queries that produce the reports could use any range of periods on any hierarchy level of the Date dimension.</p>
  
  <p>Hope this made some sense.</p>