Multidimensional Expressions (MDX) Reference
Multidimensional Expressions (MDX) is the query language that you use to work with and retrieve multidimensional data in Microsoft SQL Server 2005 Analysis Services (SSAS). MDX is based on the XML for Analysis (XMLA) specification, with specific extensions for SQL Server 2005 Analysis Services. MDX utilizes expressions composed of identifiers, values, statements, functions, and operators that Analysis Services can evaluate to retrieve an object (for example a set or a member), or a scalar value (for example, a string or a number).
MDX queries and expressions in SQL Server 2005 Analysis Services are used to do the following:
- Return data to a client application from a SQL Server 2005 Analysis Services cube.
- Format query results.
- Perform cube design tasks, including the definition of calculated members, named sets, scoped assignments, and key performance indicators (KPIs).
- Perform administrative tasks, including dimension and cell security.
MDX is superficially similar in many ways to the SQL syntax that is typically used with relational databases. However, MDX is not an extension of the SQL language and is different from SQL in many ways. In order to create MDX expressions used to design or secure cubes, or to create MDX queries to return and format multidimensional data, you need to understand basic concepts in MDX and dimensional modeling, MDX syntax elements, MDX operators, MDX statements, and MDX functions.
For more information, see the Additional Resources section on the SQL Server 2005 – Analysis Services page on the Microsoft TechNet Web site. For more information about performance issues related to MDX queries and calculations, see the section “Writing Efficient MDX” in the SQL Server 2005 Analysis Services Performance Guide.
In This Section
Describes key MDX concepts for working with SQL Server 2005 Analysis Services cubes.
Describes the various syntax elements available in the MDX language for MDX expressions, statements, and scripts.
Describes MDX query fundamentals, including the MDX SELECT statement, axes, the FROM clause, the WHERE clause, named sets, calculated members, cell calculations, property values, and manipulating or modifying data.
Describes how to construct and use MDX scripts within a SQL Server 2005 Analysis Services cube
Describes the statements, operators, and functions that define the MDX language.
XML for Analysis (XMLA)
SQL Server Language Reference
Retrieving Data from an Analytical Data Source
Creating and Editing MDX Scripts