Virtual Cube Reference Calculated Member of Underlying Cube? -
04-20-2006
, 04:54 PM
I am still learning OLAP in Analysis Services 2000 SP4. Is it possible to
reference the calculated member from an underlying cube in a virtual cube?
The import calculated member feature seems to create a new calculated member
in the virtual cube with a copy of the code from the source calculated
member. This is not what I want. Here's more information:
This is an investment application. For simplicity, say I have two shared
dimensions, Portfolio and Time. The levels under the Portfolio dimension
are (All), Portfolio, and Fund. The levels under time are not really
important, but are (All), Year, Quarter, Month. In one cube, I have monthly
measures such as balance and return at the Fund level. In another cube, I
have monthly measures such as gross return and benchmark at the Portfolio
level. Based on my research, I decided that since the data was at different
granularities, I should put it in different cubes and combine it all in a
virtual cube at the lowest common granularity, which is Portfolio level. I
had already created a calculated member in the first cube to aggregate the
returns of each fund correctly as weighted average returns at the portfolio
level. I figured that all i'd have to do in the virtual cube was to create
a third dimension (scenario dimension) that allowed me to select the
calculated measures for the type of return I wanted (portfolio, net, gross,
benchmark). To my dismay, it does not seem possible to reference the
calculated members of the underlying cubes, as is possible with the
non-calculated measures. The calculated members can be imported, but this
seems to simply copy the defining code into the virtual cube, rather than
creating a reference to the calculated member of the source cube. Of
course, if the calculated member is dependent on a number of other
calculated members, they all have to be imported as well. Basically, it
seems of no use to define these in the underlying cubes, since I have to
just redefine them to work in the virtual cube.
For example, in my FundLevel cube, I have the non-calculated member Return.
In my PortfolioLevel cube, I have the non-calculated members NetReturn,
GrossReturn, and Benchmark. Now say I have already defined a calculated
member in my FundLevel cube called WtdAvgReturn, which aggregates Return to
the portfolio level. When I create my virtual cube Combo, I want to
reference NetReturn, GrossReturn, Benchmark, and WtdAvgReturn. But I can't.
Let me define the notation [CubeName].[Measures].[MeasureName] to mean the
measure [Measures].[MeasureName] in cube CubeName. When I use
[Combo].[Measures].[GrossReturns], it seems to me that this is simply a
reference to [PortfolioLevel].[Measures].[GrossReturns]. I would like it to
work the same way for [Combo].[Measures].[WtdAvgReturn]. I would think that
if the tuple at which I am evaluating [Combo].[Measures].[WtdAvgReturn]
contains a dimension or level that the FundLevel cube does not have or has
disabled, that the measure should return empty. This is similar to what
happens for a non-calculated measure in a virtual cube when you drill down
to a level below the granularity of a source cube; empty is returned. So
the calculated member should be well-defined in the virtual cube.
I have found no mechanism to reference the calculated member of a source
cube in a virtual cube. Only non-calculated measures of the source cube can
be referenced, and any calculated members from the source cube are of no
benefit, since apparently they must be redefined in the virtual cube. WHY?
This also forces me to enable the union of the levels of the source cubes,
rather than the intersection, because I must be able to define the correct
aggregation of the Return measure to the portfolio level. But I think I
should b able to disabled the Fund level in the virtual cube and reference
[FundLevel].[Measures].[WtdAvgReturn]. There should be a layer of
abstraction there. What am I missing? |