Monday, March 19, 2012

Aggregation within Dimension Attribute

I am trying to create kind of a running sum in a calculated member in a cube down a dimension attribute. In other words, if I had values 1-5, I would want to sum the corresponding financial values as I go down the list. See example below

Dimension Value Financial Value New Calc

1 100 525

2 50 425

3 75 375

4 100 300

5 200 200

Has anyone done anything like this?

Some more business details might help us understand your question. How does this strike you?

with
member [Measures].[New Calc] as Sum({null:[YourDimension].[Dimension Value].CurrentMember},[Measures].[Financial Value])
select {[Measures].[Financial Value], [Measures].[New Calc]} on columns,
[YourDimension].[Dimension Value].[Dimension Value].Members on rows
from YourCube

No comments:

Post a Comment