@MAXS

The @MAXS calculation function for Essbase returns the maximum value from results of expressions in a member list, with options to ignore empty values.

This function 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 @MAX, which cannot ignore empty values).

Syntax

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

Parameters

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

  • @MAXS (SKIPMISSING, expList) is equivalent to @MAX (expList).

  • Because #MISSING values are greater than negative data values and less than positive data values, if the data being calculated includes only negative and #MISSING values, @MAXS returns #MISSING.

  • If the data being calculated includes only negative, 0, and #MISSING values, @MAXS may return either #MISSING or 0 values in an unpredictable manner.

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