MAXX

The MAXX function returns the maximum value taken by an expression that is evaluated for all rows in a table.

Syntax

MAXX(
    table,
    expression
)

Parameters
  • table: Table containing the rows for which the expression will be evaluated.
  • expression: Expression to evaluate for each row of the table.
Returned value

The MAXX function returns a real number, a datetime value, or a text string.

Additional Information

The function evaluates the expression included as the second argument for each of the rows of the indicated table, returning the highest value found. Only numerical values, dates and texts are considered.

The table argument can be either a table or a function that returns a table.

Examples

Suppose we have the following table showing the sales list, including the number of items sold and their unit price:

MAXX function. Example of use

We can extract the highest selling price with the following measure:

Precio máximo = MAXX(Ventas, Ventas[Precio])

...obtaining the following result (taken to a card type display):

MAXX function. Example of use

In the previous scenario, we could calculate the maximum sale amount (understood as the product of the unit price and the number of units involved in the sale) with the following measure:

Importe máximo = MAXX(Ventas, Ventas[Precio] * Ventas[Cantidad])

In this case, the function will evaluate the product of the sale price and the quantity for each row in the table and return the largest value:

MAXX function. Example of use

Related functions
Category
Statistical
Submitted by admin on Tue, 12/04/2018 - 00:11