DAX Function Guide

MINX
Empty image or helper icon

Sam McKay

CEO & Founder

How does the MINX 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?

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

Loading

Considerations when using the MINX?

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

Related Video Tutorials

Loading

Formula examples using the MINX

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 Courses

Loading