DMAX
Syntax
DMAX (Dimension, Data, {Condition})
Description
The DMAX function returns the maximum of Data for the members in Dimension where Condition is True. If Condition is omitted, DMAX returns the maximum of Data for all members in Dimension. If Data is omitted, DMAX returns the maximum of the data cube being calculated, for all members up to the current member in Dimension.
Returns
The maximum of Data for the members in Dimension where Condition is True. If Condition is omitted, DMAX returns the maximum of Data for all members in Dimension. If Data is omitted, DMAX returns the maximum of the data cube being calculated, for all members up to the current member in Dimension.
Example
Suppose that an analytic model contains a data cube called ADVERTISING_BY_PRODUCT and a data cube called UNITS_SOLD. Both data cubes use a dimension called PRODUCTS. Use the following formula to calculate the maximum units sold for all products:
MAX(PRODUCTS, UNITS_SOLD)
The DMAX function does not include a condition, so the function finds the maximum of UNITS_SOLD for all members in the PRODUCTS dimension. Use the following formula to calculate the maximum units sold for all products with advertising under USD 10000:
DMAX(PRODUCTS, UNITS_SOLD, ADVERTISING_BY_PRODUCT < 10000)
In this case, the function finds the maximum units sold only for the products where ADVERTISING_BY_PRODUCT is less than 10000.
For an example of how to tabulate data for a series of ranges, see the entry for the DAVG function.
Related Topics