Downloads
DAXAggregationBeginner

MAX

Returns the largest value in a column, or the larger of two values.

Syntax
MAX(<column>) or MAX(<expression1>, <expression2>)

Returns: A value of the same type as the input (a scalar). BLANK when the column has no values in the current filter context.

What it does

MAX finds the highest value in one column that is still visible after the filters are applied. Its second form compares two values and returns the larger. Use it for the largest invoice, the latest posting date, or the peak monthly balance.

Syntax and arguments

Example

The credit controller wants the largest single invoice in the selected period, to watch concentration risk.

Largest Invoice = MAX(Sales[SalesAmount])

In a matrix by customer, each customer row shows that customer's biggest invoice line. The grand total shows the biggest line across all customers.

Example: a second, different use

The most recent transaction date, used as the "as of" date on a report:

Last Posting Date = MAX('Date'[Date])

If the date table is filtered to a closed period, the result is the last day of that period that has data. For the last date with sales, use the date column of the fact table instead.

Things to watch

In business terms

MAX is used for the largest outstanding balance, peak inventory, highest expense claim, the latest close date and the top price in a price list. Auditors and controllers use it to look for outliers and approval thresholds.

Related functions

All DAX functions · View as Markdown · DAX fundamentals