Skip to main content
Version: I2024.2.x

Max (MDX)

Returns the Max of a Measure evaluated over a specified set.

Syntax

Max( Set_Expression, Measure )

Input Parameters

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

Measure
A basic Measure.

Return Value

Returns a value of the same type as Measure equaling the Max of the Measure evaluated over the given set.

Examples

Returns the Max of salesamount1 over a 30 period window on the [Order Date Dimension].[Order Retail445] hierarchy.

Max(
[Order Date Dimension].[Order Retail445].CurrentMember.Lag(29)
:
[Order Date Dimension].[Order Retail445].CurrentMember,
[Measures].[salesamount1]
)

Returns the Max salesamount1 value for [DateCustom].[StandardMonth] Years 2007 through 2008.

Max(
{[DateCustom].[StandardMonth].[Year].&[2007-01-01T00:00:00]:[DateCustom].[StandardMonth].[Year].&[2008-01-01T00:00:00]},
[Measures].[salesamount1]
)