Databases Reference
In-Depth Information
current member of the Time dimension, even though that member 1998 has been used to
create a subcube. You can see the results of this query in Figure 11.26.
SELECT [Time].[Time].currentmember ON COLUMNS FROM
(SELECT [Time].[Time].[Year].[1998] ON COLUMNS FROM [Warehouse and Sales])
FIGURE 11.26 The current coordinate on the Time dimension is the member ALL even
though the subcube restricts the space to the year 1998.
If the query or MDX expression uses a .CurrentMember function or relies on the default
member, it's important to know which member is actually the current coordinate.
A default member always should exist with a subcube. If a current default member doesn't
exist with the subcube, Analysis Services will assign a new one. If the attribute is aggregat-
able, the member ALL becomes the new default member for that attribute. If the attribute
is nonaggregatable, the default member is the first member that exists in the subcube.
So, for example, if we have restricted the number of measures by issuing a SubSelect, the
default member of the Measure dimension will be the first measure that exists with the
subcube. The results of the following query are shown in Figure 11.27.
SELECT Measures.defaultmember ON COLUMNS FROM
(SELECT {[Measures].[Store Sales], [Measures].[Unit Sales] } ON COLUMNS FROM [Ware-
house and Sales])
Store Sales
1644385.6
FIGURE 11.27 Because a default member doesn't exist with the subcube, a new one (Unit
Sales) has been assigned by the system.
Applying Visual Totals
So far, we have been talking about what happens with the tuples that are returned as a
result of a query when that query is executed in the context of the subcube. But there's
more to it than that: Creating a subcube can affect not only the set of tuples, but also the
values of the cells. Creating a subcube can affect how Analysis Services calculates the
Search WWH ::




Custom Search