TechNet
Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Collapse the table of content
Expand the table of content
Expand Minimize

Max (MDX)

 

Updated: March 2, 2016

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

  
Max( Set_Expression [ , Numeric_Expression ] )  

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

Numeric_Expression
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.

System_CAPS_ICON_note.jpg Note


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

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

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

MDX Function Reference (MDX)

Community Additions

ADD
Show:
© 2016 Microsoft