OLE DB Programmer's Reference |
An axis contains a set of tuples. A tuple is a vector of members.
To specify the coordinates of an axis, follow these steps:
An application can use the simple expression syntax of OLE DB for OLAP to perform these operations. For the complete syntax of these expressions, see Chapter 26: MDX Grammar. Following are some examples of the many ways to choose a set of members:
{Venkatrao, Netz}
USA.CHILDREN
generates the set
{USA_North, USA_South}
{USA_North.CHILDREN, USA_South, Japan}
results in the set
{Seattle, Boston, USA_South, Japan}
Netz:Pizzo
on the SalesRep dimension, whose members are naturally ordered by last name, yields the set
{Netz, Nakonieczny, Oks, Pace, Patel, Patterson, Pederson, Perin, Pizzo}
Note The expression is an inclusive range. That is, the members on both sides of the colon ( : ) specifier are included.
After an application generates sets that contain the members that it wants from each dimension on a given axis, it can use the CROSSJOIN function to get a cross-product of these sets.
Putting all these concepts together, a <set_expression> value for the x-axis in the example dataset is as follows:
CROSSJOIN({Venkatrao, Netz}, {USA_North.CHILDREN, USA_South, Japan})
The expression for the y-axis in the example dataset is the following:
{Qtr1.CHILDREN, Qtr2, Qtr3, Qtr4.CHILDREN}
Note The MDX syntax is much more extensive than is shown in these few examples. Some functionality not covered here includes the following:
See "Advanced MDX" for more details about MDX. Chapter 26: MDX Grammar, contains the full MDX syntax.
1998-2001 Microsoft Corporation. All rights reserved.