@MAXS

Returns the maximum value among the results of the expressions in the specified member list, with options to skip missing or zero values (in contrast with the @MAX function, which cannot ignore these values).

Syntax

@MAXS (SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, expList)
ParameterDescription

SKIPNONE

Includes all cells specified in expList in the operation, regardless of their content

SKIPMISSING

Ignores all #MISSING values

SKIPZERO

Ignores all 0 values

SKIPBOTH

Ignores all 0 and #MISSING values

expList

Comma-delimited list of members, variable names, functions, or numeric expressions, all of which return numeric values

Notes

Example

For both examples, assume a database similar to Sample Basic. The Measures dimension includes two members: COGS (cost of goods sold) and OtherInc_Exp (miscellaneous income and expenses). The data can include 0 and #MISSING values.

Example 1

Qtr1_Max = @MAXS(SKIPBOTH, Jan:Mar);

This example ignores #MISSING and 0 values for all members of the Measures dimension. This example produces the following results:

                   Jan       Feb       Mar  Qtr1_Max
              ========  ========  ========  ========  
COGS          #MISSING      1500      2300      2300
OtherInc_Exp      -500      -350         0      -350 

Example 2

Qtr1_Max = @MAXS(SKIPNONE, Jan:Mar);

This example includes #MISSING and 0 values in the calculation, for all members of the Measures dimension. This example produces the following results:

                   Jan       Feb       Mar  Qtr1_Max
              ========  ========  ========  ========                      
COGS          #MISSING      1500      2300      2300
OtherInc_Exp      -500      -350         0         0 

See Also