You are here: Functions > MAXIMUM()

MAXIMUM()

MAXIMUM() returns the greater of a set of numbers or dates.

Use of variable arrays as a parameter is supported for this function. This means that a list of values can be provided using a single variable array. For more information see Variable Arrays.

MAXIMUM() is the opposite of the MINIMUM() function.

Function Format

MAXIMUM(N1, N2 <,N3 ...>)

The greater value of N1, N2, etc. is always returned. If a variable array is used as one of the parameters, all values in contained in the variable array are compared to any other listed parameters.

If the number of decimals in a set of numbers is different, MAXIMUM() adjusts the result to the greater number of decimals.

Date values are entered as YYYYMMDD regardless of the date format of the DATE field being referenced.

If a variable array is used as one of the parameters, all values in contained in the variable array are compared in conjunction with any other listed parameters.

Examples

MAX(4,7) = 7

MAX(7.5,4) = 7.5

MAX(7,4.55) = 7.00

MAX(4,6,7) = 7.00

MAX(‘20120420‘,‘20120630‘,‘20120814‘) = ‘20120814‘

If you have a file of overdue accounts, to create an Interest_Due field that has a minimum value of $1.00 or greater, specify:

MAXIMUM(BALANCE * ANNUAL_RATE,1)

If the balance multiplied by the interest rate is less than one dollar, MAX() returns 1. Otherwise, MAX() returns the calculated interest amount.