Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at


Hitachi Vantara Lumada and Pentaho Documentation

About Multidimensional Expression Language

The Multidimensional Expression Language (MDX) is an OLAP database query and calculation language similar to SQL. It is the method by which a dataset is retrieved from a OLAP database. While you do not necessarily have to know MDX in order to use Pentaho's client tools, you should be somewhat familiar with it for the purpose testing your Mondrian schema.

MDX Syntax

If you are already familiar with SQL, then much of the MDX syntax will look familiar, and the rest should be relatively easy to learn. You can edit the MDX using Analyzer or a text editor.

There are six MDX data types:

  • Dimension or hierarchy
  • Level
  • Member
  • Tuple
  • Scalar
  • Set

Below is an example of a very simple MDX query:

   { [Measures].[Salesfact] } ON COLUMNS,
   { [Date].[2004], [Date].[2005] } ON ROWS
FROM Sales

MDX was initially developed by Microsoft for its SQL Server analysis products, though it has since become an independent standard. It's been around long enough now that there are many MDX tutorials and references, most notably:

MDX implementations vary, and many MDX documentation resources are specific to certain niche products or standards. Not all MDX functions and extensions are supported in Pentaho Analysis.