In a formula-type column, the function MAX_NUM_ELEMENTS() returns the highest numeric value among the values in a column, including columns containing multiple values, such as fields of type Linked Table Column.
-
Numeric function name:
MAX_NUM_ELEMENTS()
Syntax
MAX_NUM_ELEMENTS(column)
Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to be added within quotation marks.
- do not use quotation marks for numbers.
Parameters
| Parameter | Description |
|---|---|
column |
The column containing one or more numeric values. Can be a Link to another table column or a Linked Table Column type. |
Example
MAX_NUM_ELEMENTS($Linked Amounts)
The column returns the highest value among the linked amounts.
Note: I can display the highest value among columns of number type, but also of text type provided they contain only numeric values. However, to avoid input errors, it is recommended to use number-type columns.
Return type
The function returns a number (the highest value).
The output type format of the result can be configured in the output field options of the formula editor. For more details, see Output format options in the Formula Column article.
Business use case
MAX_NUM_ELEMENTS() identifies the highest value of a linked set: largest order, highest score, consumption peak.
Best practice
Combine MIN_NUM_ELEMENTS() and MAX_NUM_ELEMENTS() to frame a range of values.