MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 24: Multidimensional Expressions


 

Set, Tuple, and Member Specification

An axis contains a set of tuples. A tuple is a vector of members. To specify the coordinates of an axis, follow these steps:

  1. Create an expression that generates members. Some expressions result in a single member, while others result in a set of members.

  2. Obtain the desired set of members for each dimension on the axis.

  3. Take a cross-product of these member sets to yield a set of tuples that represents an axis.

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 "MDX Grammar." Following are some examples of the many ways to choose a set of members:

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: