MAX

Updated on

MAX is a DAX function that returns the largest numeric value or largest string in a column, or the larger value between two scalar expressions.

Syntax

MAX(
   ColumnNameOrScalar1,
   Scalar2
)
Argument Properties Description
ColumnNameOrScalar1 The column in which you want to find the largest numeric value or largest string, or the first scalar expression to compare.
Scalar2 Optional The second number to compare.

Return Values

The largest value.

Remarks

  • When comparing two expressions, blank is treated as 0 when comparing. That is, Max(1, Blank() ) returns 1, and Max( -1, Blank() ) returns 0. If both arguments are blank, MAX returns a blank. If either expression returns a value which is not allowed, MAX returns an error.

  • TRUE/FALSE values are not supported. If you want to evaluate a column of TRUE/FALSE values, use the MAXA function.

Example 1

The following example returns the largest value found in the ExtendedAmount column of the InternetSales table.

= MAX(InternetSales[ExtendedAmount])

Example 2

The following example returns the largest value between the result of two expressions.

= Max([TotalSales], [TotalPurchases])

Other functions related to MAX are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/max-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy