Returns the largest value in a column, or the larger value between two scalar expressions. Ignores logical values. Strings are compared according to alphabetical order.
The column in which you want to find the largest value, or the first scalar expression to compare.
The second value to compare.
Largest value found in the column or in the two expressions.
When used with a single column, the MAX function internally executes MAXX, without any performance difference.
The following MAX call:
MAX ( table[column] )
corresponds to the following MAXX call:
MAXX ( table, table[column] )
The result is blank in case there are no rows in the table with a non-blank value.
When used with two arguments, the syntax:
MAX ( exp1, exp2 )
VAR v1 = exp1 VAR v2 = exp2 RETURN IF ( v1 > v2, v1, v2 )
Learn more about MAX in the following articles:
Computing running totals in DAX
This article shows how to compute a running total over a dimension, like for example the date. » Read more
Understanding the difference between LASTDATE and MAX in DAX
This article explains why in many cases, MAX should be used instead of LASTDATE to search for the last date in a time period using DAX. » Read more
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo, Jes Hansen
MSDN documentation: https://docs.microsoft.com/en-us/dax/max-function-dax