MINX

The MINX function returns the minimum value of the values that an expression takes that is evaluated for all the rows of a table.

Syntax

MINX(
    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 MINX function returns a real number or a temporary value.

Additional Information

The function evaluates the expression included as the second argument for each of the rows of the indicated table, returning the smallest value found. Only numeric values, dates and texts are considered (the existence of Booleans returns an error).

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:

MINX function. Example of use

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

Precio mínimo = MINX(Ventas, Ventas[Precio])

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

MINX function. Example of use

In the previous scenario, we could calculate the minimum sale amount (understanding the sale amount as the product of the price times the quantity) with the following measure:

Importe mínimo = MINX(Ventas, Ventas[Precio] * Ventas[Cantidad])

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

MINX function. Example of use

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