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


 

Specifying the Contents of an Axis

The number of axes and the contents of each axis are specified after the SELECT keyword and immediately before the FROM clause in the expression template shown in "Parts of an MDX Statement."

Each <axis_specification> value specifies one axis. The number of axes in the dataset is equal to the number of <axis_specification> values in the MDX statement.

To understand what constitutes an <axis_specification> value, it is necessary to take a look at the nature of an axis.

Contents of the x-Axis

In the dataset of the SalesData example, the x-axis has two nested dimensions: Geography and SalesRep. From the Geography dimension, four members are selected: Seattle, Boston, USA_South, and Japan. Two members are selected from the SalesRep dimension: Venkatrao and Netz. This yields a total of eight coordinates on this axis (8 = 4*2).

You can represent each coordinate as a tuple with two members—one from the SalesRep dimension and another from the Geography dimension—as follows:

(Venkatrao, Seattle), (Venkatrao, Boston), (Venkatrao, USA_South), 
(Venkatrao, Japan), (Netz, Seattle), (Netz, Boston), (Netz, USA_South), 
(Netz, Japan)

Consider an axis as comprising a set of tuples. If there is only one dimension on an axis, each tuple is just a member. If there are two dimensions, two components compose each tuple, with each component being a member of one of the dimensions. In general, if there are n dimensions nested on an axis, n components compose each tuple, where each component is a member of one of the nested dimensions.

Contents of the y-Axis

The y-axis of the dataset has the following set of tuples:

Jan, Feb, Mar, Qtr2, Qtr3, Oct, Nov, Dec

In this case, each tuple has just one component, making it the same as a member because there is only one dimension on this axis.