Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.75 KB

min-mdx.md

File metadata and controls

58 lines (43 loc) · 1.75 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom
Min (MDX)
Min (MDX)
kfollis
kfollis
kfollis
02/17/2022
sql
analysis-services
reference
mdx

Min (MDX)

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

Syntax

  
Min( Set_Expression [ , Numeric_Expression ] )  

Arguments

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.

Remarks

If a numeric expression is specified, the specified numeric expression is evaluated across the set and then returns the minimum 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 minimum value from that evaluation.

Note

[!INCLUDEssASnoversion] ignores nulls when calculating the minimum value in a set of numbers.

Example

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

WITH MEMBER Measures.x AS Min   
   ([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]  
  

See Also

MDX Function Reference (MDX)