Cheat Sheets/Power BI/MINX / MAXX
DAX function

MINX / MAXX — DAX function reference

Min/max of a per-row expression.

Syntax

dax
MINX(<table>, <expression>)    MAXX(<table>, <expression>)

Examples

dax
MAXX(Sales, Sales[Qty] * Sales[Price])
→ A number

Context transition evaluates the SUM once per category before MAXX picks the largest.

dax
MAXX(VALUES(Product[Category]), CALCULATE(SUM(Sales[Amount])))
→ The best-selling category's total, whatever it is
dax
MINX(ALLSELECTED(Product), [Total Sales])
→ Lowest-selling visible product's total

Common mistakes & gotchas

Related DAX functions

From Aggregations

← Back to the Power BI (DAX) cheat sheet