The basic Multidimensional Expressions (MDX) query is the SELECT statement-the most frequently used query in MDX. By understanding how an MDX SELECT statement must specify a result set, what the syntax of the SELECT statement is, and how to create a simple query using the SELECT statement, you will have a solid understanding of how to use MDX to query multidimensional data.

Specifying a Result Set

In MDX, the SELECT statement specifies a result set that contains a subset of multidimensional data that has been returned from a cube. To specify a result set, an MDX query must contain the following information:

To identify the query axes, the cube that will be queried, and the slicer axis, the MDX SELECT statement uses the following clauses:

SELECT Statement Example

The following example shows a basic MDX query that uses the SELECT statement.

SELECT
NON EMPTY { 
	[MEASURE_1],
	[MEASURE_2] 
} ON COLUMNS,
NON EMPTY { 
	{ { [TABLE].[COLUMN_NAME].&[FILTER1],
		[TABLE].[COLUMN_NAME].&[FILTER2] } } *
	{ HIERARCHIZE ( [TABLE].[COLUMN_NAME].[COLUMN_NAME].AllMembers ) } *
	{ HIERARCHIZE ( FILTER ( [TABLE].[COLUMN_NAME].[COLUMN_NAME] , [TABLE].[COLUMN_NAME].CurrentMember.MemberValue >= DATEADD("m",-6,NOW()) ) ) } *
	{ HIERARCHIZE ( FILTER ( [TABLE].[COLUMN_NAME].[COLUMN_NAME] , LEFT([TABLE].[COLUMN_NAME].CurrentMember.MemberValue,1) = 'Partial String' ) ) }
} ON ROWS
FROM (
	SELECT {
		[TABLE].[COLUMN_NAME].[COLUMN_NAME].[1st Option],
	 	[TABLE].[COLUMN_NAME].[COLUMN_NAME].[2nd Option]
	} ON COLUMNS
	FROM [CUBE]
)

Source

MDX Query - The Basic Query