How does the MAXX function (DAX) work?
The MAXX function (DAX) evaluates an expression for each table row, and returns the largest value.
MAXX Formula Syntax
How do you use the MAXX function?
The table statement for the MAXX function may be the name of a table, or the expression evaluating a table. The second argument determines the expression to be evaluated for each table row.
Related Blog Posts
Related Support Forum Posts
Considerations when using the MAXX function
Only the following are listed as to the values to be evaluated:
Blank values are ignored. TRUE/FALSE values are not supported.
Related Video Tutorials
Formula examples using the MAXX function
The following formula uses an expression as the second argument to calculate the total amount of taxes and shipping for each order in the table, InternetSales. The expected result is 375.7184.
= MAXX (
InternetSales, InternetSales[TaxAmt]+ InternetSales[Freight]
The following formula first filters the table InternetSales, by using a FILTER expression, to return a subset of orders for a specific sales region, defined as [SalesTerritory] = 5. The MAXX function then evaluates the expression used as the second argument for each row of the filtered table, and returns the highest amount for taxes and shipping for just those orders. The expected result is 250.3724.
InternetSales,[SalesTerritoryCode]=”5″), InternetSales[TaxAmt]+ InternetSales[Freight]
(East_Sales,East_Sales[No. of Units]*East_Sales[Unit Price]