max

Returns the maximum value from a list of values.

Function

max(input)

Arguments

ArgumentData Type
inputcomparable value list
resultcomparable value

Comments

The max function can be used with various data types, and behave as follows:

  • Numeric
    • max returns the highest value.
  • Date-only, Time-Only, Date-Time
    • max returns the latest value.
  • Strings
    • max returns the last value, when values are in alphabetical order
  • Choice field values
    • max returns the choice value that is considered most maximum, which is to say the choice value that appears latest on the list of values in the Choice Field Properties page.

Note: it is also possible to show the maximum value of a column in a report without writing a calculation by using column totals  or by summarising a report relationship.

Examples

The following calculation assumes it is run in the context of a hypothetical purchase order record that has multiple items, each with a numeric 'weight' field. It returns the numeric weight value of the heaviest item.

max([Items].[Weight])

The following calculation assumes it is run in the context of a person. It returns the priority level of the highest in-progess task related to that user. For example, if the person has low, medium and high priority tasks in progress, the result will be 'High'

max([Assigned Tasks].[Priority] where [Status]='In Progress')