MAXA DAX Function (Aggregation)
Returns the largest value in a column. Does not ignore logical values and text.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| ColumnName |
The column in which you want to find the largest value. |
Return values
Largest value found in the column.
Remarks
The function MAXA corresponds to MAX used with a single column as an argument for numeric and date data types.
When MAXA operates with a Boolean data type, it considers TRUE as 1 and FALSE as 0.
When the argument is a column of text, MAXA treats every text value as 0, including an empty string and a string that looks like a number. MAX returns the maximum text value. The result of MAXA is a number, not text.
For numeric and date arguments, the MAXA function internally executes MAXX, without any performance difference. This correspondence does not apply to a text column: MAXX returns the maximum text value, and MAXA returns 0.
The following MAXA call:
MAXA ( 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.
The behavior described above has an undocumented side effect caused by a bug. If the argument of MAXA is a measure, the result is not predictable and depends on the version of the engine. In a query expression that is not part of a measure, MAXA returns an error: “Cannot identify the table that contains [Measure] column.” In the expression of a measure, some versions of the engine evaluate the argument measure for each row of the table that contains the measure where you write MAXA. Other versions return a different value without an error. Do not use a measure as the argument of MAXA. To get the maximum of a measure over a table, use MAXX and specify the table.
Examples
More examples available for the MAX and MAXX functions.
-- MAXA required to aggregate boolean columns
-- FALSE is 0
-- TRUE is 1
DEFINE
MEASURE Customer[Group Large Family 1] = MAXA ( Customer[LargeFamily] )
MEASURE Customer[Group Large Family 2] =
MAXX ( Customer, 1 * Customer[LargeFamily] )
EVALUATE
SUMMARIZECOLUMNS (
Customer[State],
"State has large families 1", [Group Large Family 1],
"State has large families 2", [Group Large Family 2]
)
ORDER BY customer[State]
| State | State has large families 1 | State has large families 2 |
|---|---|---|
| Ahal Province | 0 | 0 |
| Alabama | 0 | 0 |
| Alaska | 0 | 0 |
| Alberta | 1 | 1 |
| Alpes-Maritimes | 0 | 0 |
| Arizona | 0 | 0 |
| Armenia | 0 | 0 |
| Baden-Wuerttemberg | 1 | 1 |
| Bavaria | 1 | 1 |
| Beijing | 0 | 0 |
| Berlin | 1 | 1 |
| Bern | 0 | 0 |
| British Columbia | 1 | 1 |
| California | 1 | 1 |
| Central Greece and Evvoia | 0 | 0 |
| Chubu | 0 | 0 |
| Chuy Province | 0 | 0 |
| Colorado | 0 | 0 |
| Connecticut | 0 | 0 |
| Damascus | 0 | 0 |
| England | 1 | 1 |
| Essonne | 1 | 1 |
| Florida | 1 | 1 |
| Garonne (Haute) | 1 | 1 |
| Georgia | 0 | 0 |
| GuangDong | 0 | 0 |
| Hamburg | 1 | 1 |
| Hauts de Seine | 1 | 1 |
| Hesse | 1 | 1 |
| Hokkaido | 0 | 0 |
| Hong Kong | 0 | 0 |
| Illinois | 0 | 0 |
| Islamabad Capital Territory | 0 | 0 |
| Kansai | 0 | 0 |
| Kanto | 0 | 0 |
| Kentucky | 0 | 0 |
| Krung Thep | 0 | 0 |
| Leinster | 0 | 0 |
| Lisboa Region | 0 | 0 |
| Loiret | 1 | 1 |
| Lombardia | 0 | 0 |
| Lower Saxony | 1 | 1 |
| Madrid | 0 | 0 |
| Maharashtra | 0 | 0 |
| Maine | 0 | 0 |
| Maryland | 0 | 0 |
| Massachusetts | 0 | 0 |
| Minnesota | 0 | 0 |
| Mississippi | 0 | 0 |
| Missouri | 1 | 1 |
| Molonglo | 0 | 0 |
| Montana | 1 | 1 |
| Moselle | 1 | 1 |
| Moskovskaya oblast | 0 | 0 |
| National Capital Territory of Delhi | 0 | 0 |
| New Jersey | 0 | 0 |
| New South Wales | 1 | 1 |
| New York | 0 | 0 |
| Noord-Holland | 0 | 0 |
| Nord | 1 | 1 |
| North Carolina | 0 | 0 |
| North Rhine-Westphalia | 1 | 1 |
| Northwestern | 0 | 0 |
| Ohio | 0 | 0 |
| Ontario | 0 | 0 |
| Oregon | 1 | 1 |
| Pas de Calais | 1 | 1 |
| Queensland | 1 | 1 |
| Saar | 1 | 1 |
| Saxony | 1 | 1 |
| Schleswig-Holstein | 1 | 1 |
| Scotland | 0 | 0 |
| Seine (Paris) | 1 | 1 |
| Seine et Marne | 1 | 1 |
| Seine Saint Denis | 1 | 1 |
| Seoul-jikhalsi | 0 | 0 |
| Shanghai | 0 | 0 |
| Singapore | 0 | 0 |
| Somme | 1 | 1 |
| South Australia | 1 | 1 |
| South Carolina | 0 | 0 |
| Taiwan | 0 | 0 |
| Tasmania | 1 | 1 |
| Tehran | 0 | 0 |
| Texas | 1 | 1 |
| Thimphu District | 0 | 0 |
| Tohoku | 0 | 0 |
| Utah | 0 | 0 |
| Val de Marne | 1 | 1 |
| Val d’Oise | 1 | 1 |
| Victoria | 1 | 1 |
| Virginia | 1 | 1 |
| Warszawa | 0 | 0 |
| Washington | 1 | 1 |
| West Bengal | 0 | 0 |
| Wisconsin | 0 | 0 |
| Wyoming | 1 | 1 |
| Xinjiang | 0 | 0 |
| Yeongnam | 0 | 0 |
| Yveline | 1 | 1 |
DEFINE
TABLE T = { "b", "c", "a" }
EVALUATE
ROW (
"MIN", MIN ( T[Value] ),
"MINA", MINA ( T[Value] ),
"MAX", MAX ( T[Value] ),
"MAXA", MAXA ( T[Value] )
)
| MIN | MINA | MAX | MAXA |
|---|---|---|---|
| a | 0 | c | 0 |
Related functions
Other related functions are:
Last update: Dec 1, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber, Daniil Maslyuk
Microsoft documentation: https://docs.microsoft.com/en-us/dax/maxa-function-dax