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


 

Projecting Tuple Sets on Axes

After an application has defined the set of tuples for each axis, it needs to specify which set is projected on which axis. Going back to the query template in "Parts of an MDX Statement," there is an <axis_specification> value for each axis in the dataset.

The <axis_specification> syntax looks like the following:

<axis_specification> ::= <set> ON <axis_name>
<axis_name> ::= COLUMNS | ROWS | PAGES | SECTIONS | CHAPTERS
              | AXIS(index)

Each axis is associated with a number: 0 for the x-axis, 1 for the y-axis, 2 for the z-axis, and so on. To project a set on an axis, an application uses the syntax AXIS(<index>). The <index> value is the axis number. The first five axes—COLUMNS, ROWS, PAGES, SECTIONS, and CHAPTERS—can be used in place of AXIS(0), AXIS(1), AXIS(2), AXIS(3), and AXIS(4), respectively.

It is an error for an MDX statement to skip axes or to not start from axis 0. That is, every statement must start from the COLUMNS axis and must not miss any intermediate axes, such as having COLUMNS and PAGES axes but no ROWS axis.

Note   OLE DB for OLAP does not impose any restrictions on the number of axes supported in a dataset other than the minimum requirement of three for OLE DB for OLAP compliance. To find out the number of axes supported by the provider, the application can check the value of the MDPROP_AXES property in the DBPROPSET_DATASOURCEINFO property set.