Create offline cube files (.cub) with OlapCube. Download Now!

table of contents

Specifying the Contents of an Axis Dimension

Axis dimensions determine the edges of a multidimensional result set. Multidimensional Expressions (MDX) uses the SELECT clause to specify axis dimensions by assigning a set to a particular axis. The following information describes how this assignment is handled in MDX.

In the following syntax example, each <axis_specification> value defines one axis dimension. The number of axes in the dataset is equal to the number of <axis_specification> values in the Multidimensional Expressions (MDX) query. An MDX query can support up to 128 specified axes, but very few MDX queries will use more than 5 axes.

The breakdown of the <axis_specification> syntax is:

<axis_specification> ::= <set> ON <axis_name>

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

Each axis dimension is associated with a number: 0 for the x-axis, 1 for the y-axis, 2 for the z-axis, and so on. The <index> value is the axis number. For the first 5 axes, the aliases COLUMNS, ROWS, PAGES, SECTIONS, and CHAPTERS can be used in place of AXIS(0), AXIS(1), AXIS(2), AXIS(3), and AXIS(4), respectively.

An MDX query cannot skip axes. That is, a query that includes one or more <axis_name> values must not exclude lower-numbered or intermediate axes. For example, a query cannot have a ROWS axis without a COLUMNS axis, or have COLUMNS and PAGES axes without a ROWS axis.

However, you can specify a SELECT clause with no axes (that is, an empty SELECT clause). In this case, all dimensions are slicer dimensions, and the MDX query selects one cell.

Each <set> value defines the contents of the axis. For more information about sets, see Members, Tuples, and Sets.