Multidimensional Expressions

Multidimensional Expressions (MDX ) is a query language for OLAP databases. It was developed by Microsoft and is establishing itself as an industry standard. MDX has been significantly developed by Mosha Pasumansky. MDX is generally very complex and powerful. From the academic side, the criticism is attached to MDX that there is no complete definition of the language and it only seems based on SQL. MDX is used as a standardized query language of OLE DB for OLAP ( ODBO ) and XML for Analysis.


The basic components of MDX are Measures and Dimensions, which correspond to the facts and dimensions of a data warehouse. The dimensions consist of a set of members (classification nodes) at different levels (classification step ) on Multiple Hierarchies (classification paths) are interconnected over that can be aggregated. The members must be clearly identified in each case.


An MDX query has generally the following form:

SELECT ON COLUMNS axis, axis ON ROWS, ... FROM cube WHERE slice Here, from usually an OLAP cube ( cube english; FROM) selected a set of dimensions and belonging to them, classification nodes ( SELECT) and on different axes of the result table ( COLUMNS, ROWS, PAGES ... ) mapped. With a slice ( WHERE ), a selection can be made within the facts.

With simple brackets strings are marked as names. Curly braces are used to define quantities.

Example of an MDX query

SELECT { [ Measures]. [Unit Sales], [ Measures]. [ Store Cost ] } ON COLUMNS,   order ( except ( [Promotion Media]. [ Media Type]. members,                { [Promotion Media]. [ Media Type]. [No Media] })         [ Measures]. [Unit Sales], DESC) ON ROWS FROM Sales literature

  • Mosha Pasumansky, Mark Whitehorn, Rob Zare: Fast Track to MDX. ISBN 1-84628-174-1
  • George Spofford: MDX Solutions. Wiley, 2001, ISBN 0-471-40046-7