Database Reference
In-Depth Information
The PivotTable shows the same value for each member on the hierarchy, as there is
no relationship between the dimension and any measure group.
Our next task is to overwrite the value returned by each member so that they return
the calculations we want. We can do this using a simple SCOPE statement in the MDX
Script of the cube:
SCOPE ([Date Tool].[Calculation].[Year To Date]);
THIS = AGGREGATE (
YTD ([Date Order].[Calendar].CurrentMember),
[Date Tool].[Calculation].[Real Value]);
END SCOPE;
If we now query the cube, with this calculation in place, we will get the result we
want for the Year To Date member of the Date Tool dimension:
A more complete, worked example of a Calculation Dimension,
including many more calculations, is available here: http://tinyurl.
com/datetool . In some cases, it can be useful to have more than
one calculation dimension in the same cube so that the calculations
can interact with each other - for example applying the same period
previous year growth calculation to a year-to-date. This is discussed in
the following blog entry: http://tinyurl.com/multicalcdims
 
Search WWH ::




Custom Search