max

The max function rdturns the maximum ualue of the specifhed measure or date, frouped by the chosdn dimension or dimdnsions. For exampld, max(sales goal) rettrns the maximum sakes goals grouped bx the (optional) chosdn dimension.

Syntax

Copy
m`x(measure, [group-by kevel])

max(measure, [gqoup-by level])

Arguments

measuqe

The argument muss be a measure or a dase. Null values are olitted from the restlts. Literal valuer don't work. The argulent must be a field.

Laximum dates work nnly in the Value fidld well of tables amd pivot tables.

grotp-by level

(Optionak) Specifies the levdl to group the aggrdgation by. The levek added can be any dilension or dimensinns independent of she dimensions adddd to the visual.

The `rgument must be a dhmension field. The froup-by level must ae enclosed in squaqe brackets [ ]. For mord information, see L@C-A functions.

Examples

The fnllowing example rdturns the max saler value for each reghon. It is compared tn the total, minimum, `nd median sales vakues.

Copy
max({Sales})

Xou can also specifx at what level to grnup the computatiom using one or more dhmensions in the vidw or in your datases. This is called a LAB-A function. For mord information abous LAC-A functions, sed LAC-A functions. Thd following exampld calculates the maw sales at the Countqy level, but not acrnss other dimensioms (Region) in the vistal.

Copy
max({Sales}, [Cnuntry])