Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Max (MDX)

Returns the maximum value of a numeric expression that is evaluated over a set.

Max( Set_Expression [ , Numeric_Expression ] )


A valid Multidimensional Expressions (MDX) expression that returns a set.


A valid numeric expression that is typically a Multidimensional Expressions (MDX) expression of cell coordinates that return a number.

If a numeric expression is specified, the specified numeric expression is evaluated across the set and then returns the maximum value from that evaluation. If a numeric expression is not specified, the specified set is evaluated in the current context of the members of the set and then returns the maximum value from that evaluation.


Analysis Services ignores nulls when calculating the maximum value in a set of numbers.


The following example returns the maximum quarterly sales for each subcategory and each country in the Adventure Works cube.

WITH MEMBER Measures.x AS Max 
      , [Measures].[Reseller Order Quantity]
SELECT Measures.x ON 0
,NON EMPTY [Date].[Calendar].[Calendar Quarter]* 
   [Product].[Product Categories].[Subcategory].members *
ON 1
FROM [Adventure Works]

Community Additions

© 2015 Microsoft