Export (0) Print
Expand All

MAXA Function

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the largest value in a column. Logical values and blanks are counted.

MAXA(<column>)

Term

Definition

column

The column in which you want to find the largest value.

A decimal number.

The MAXA function takes as argument a column, and looks for the largest value among the following types of values:

  • Numbers

  • Dates

  • Logical values, such as TRUE and FALSE. Rows that evaluate to TRUE count as 1; rows that evaluate to FALSE count as 0 (zero).

Empty cells are ignored. If the column contains no values that can be used, MAXA returns 0 (zero).

If you do not want to include logical values and blanks as part of the calculation, use the MAX function.

The following example returns the greatest value from a calculated column, named ResellerMargin, that computes the difference between list price and reseller price.

=MAXA([ResellerMargin])

The following example returns the largest value from a column that contains dates and times. Therefore, this formula gets the most recent transaction date.

=MAXA([TransactionDate])
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft