OpenBI Docs Buy

MINX

The smallest value of an expression over a table's rows; with TRUE as a third argument, text and numbers compare as ORDER BY sorts them.

Group: Aggregation. Compatible with DAX.

Syntax

MINX ( <table>, <expression> [, <variant>] )
ParameterTypeDescription
tableTableThe rows to go through.
expressionExpression
evaluated for each row
The value worked out for each row: a number, a date or text.
variantBoolean
optional
TRUE to allow results of different types, numbers and texts, compared in the order a sort puts them; FALSE or left out to keep to one type.

Returns

Same type as its results. The smallest of the expression's results, blanks left out.

Remarks

  • Over an empty table, or when every result is blank, the answer is BLANK.
  • A blank result is skipped, not taken as zero: the smallest of 3, blank and 5 is 3.
  • Text is compared without regard to case.

Examples

Blanks are skipped

EVALUATE
ROW ( "Smallest", MINX ( DATATABLE ( "Value", INTEGER, { { 3 }, { BLANK () }, { 5 } } ), [Value] ) )
Smallest
3

The weakest product's liters

EVALUATE
ROW ( "Fewest liters", MINX ( VALUES ( Products[Product] ), [Liters sold] ) )
Fewest liters
169179

MIN, MAXX, TOPN, AVERAGEX.

Last updated · OpenBI Studio 0.3.74