MINX Function (DAX)

How does the MINX function (DAX) work?

MINX function returns the smallest numeric value for each row of a table resulting from evaluating an expression.

MINX Formula Syntax

= MINX(
     <table>, < expression>
)

How do you use the MINX function?

The MINX function takes a table, or an expression that returns a table as its first argument. The second argument includes the expression for each table row which is evaluated.

Related Blog Posts

 

Considerations when using the MINX function

Blank values are skipped. TRUE/FALSE values are not supported.

Related Video Tutorials

Formula examples using the MINX function

Example 1

The following example filters the table, InternetSales, and returns only rows for a specific sales territory. The formula then finds the minimum value in the column, Freight.

= MINX (
    FILTER(InternetSales, [SalesTerritoryKey] = 5),[Freight]
)

Example 2

The following example uses the same filtered table as in the previous example, but instead of merely looking up values in the column for each row of the filtered table, the function calculates the sum of two columns, Freight and TaxAmt, and returns the smallest value resulting from that calculation.

= MINX (
    FILTER(InternetSales, InternetSales[SalesTerritoryKey] = 5), InternetSales[Freight] + InternetSales[TaxAmt]
)

In the first example, the names of the columns are unqualified. In the second example, the column names are fully qualified.

 

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI