DAX Function Guide

MAXX
Empty image or helper icon

Sam McKay

CEO & Founder

How does the MAXX work?
The MAXX function (DAX) evaluates an expression for each table row, and returns the largest value.
MAXX Formula Syntax

MAXX(
     <table>,<expression>
)

How do you use the MAXX?

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

Loading

Considerations when using the MAXX?

Only the following are listed as to the values to be evaluated:

  • Numbers
  • Texts
  • Dates

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

Related Video Tutorials

Loading

Formula examples using the MAXX

Example 1

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]
)

Example 2

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.

=MAXX (
     InternetSales,[SalesTerritoryCode]=”5″), InternetSales[TaxAmt]+ InternetSales[Freight]
)

Example 3

=MAXX (
     (East_Sales,East_Sales[No. of Units]*East_Sales[Unit Price]
)

Related Courses

Loading