The MEDIAN() function returns the median value of a set of numbers, that is, the middle value when the values are sorted in ascending order. It returns a number and is compatible with fields from a relation: the calculation is applied to all linked items.
Syntax
MEDIAN(value1, value2, …)
Calling function parameters in TimeTonic:
-
$field_name= field (link, linked table column, number, selection, formula, text...). - "free text" = free text to be added between quotation marks.
- Do not use quotation marks for numbers.
Parameters
Values are automatically sorted before calculating the median, and non-numeric values are ignored. The output format can be configured in the output field options of the formula editor. See Output format options in the Formula column article.
Examples
Odd number of values
MEDIAN(3, 1, 8, 9, 2)
Result: 3
Even number of values
MEDIAN(1, 2, 3, 4)
Result: 2.5
Go further
AVERAGE()
The average of the same set of values, more sensitive to extreme values.
Or continue with
Formula glossary
All available operators and functions, sorted by category.