Introduction to Axis Specifications

An axis is a specification determining the layout of query results from a database. Axes fit into MDX queries as follows:

SELECT <axis> [, <axis>...]
FROM <database> 

At least one axis must be specified in any MDX query.

Up to 64 axes may be specified, beginning with AXIS(0) and continuing with AXIS(1)...AXIS(63). Using more than three axes is uncommon. The order of axes is not important; however, when a set of axes 0 through n are specified, no axis between 0 and n should be skipped. Additionally, a dimension cannot appear on multiple axes.

The first five axes have keyword aliases, as listed in Table 110:

Table 110. Axes Keyword Aliases

Axes Keyword AliasAxes

ON COLUMNS

Can be used in place of AXIS(0)

ON ROWS

May replace AXIS(1)

ON PAGES

May replace AXIS(2)

ON CHAPTERS

May replace AXIS(3)

ON SECTIONS

May replace AXIS(4)

For example, in the following query, the axis specification is {Jan}ON COLUMNS:

SELECT
  {Jan} ON COLUMNS
FROM Sample.Basic