median
FEEL built-in function · FEEL list functions
median(list) or median(n1, …, nN)
Returns the median: the middle element of the sorted values, or the mean of the two middle elements for an even count.
Parameters
| Parameter | Type | Description |
|---|---|---|
| list | list of numbers | numbers, as one list or as separate arguments |
Examples
median(8, 2, 5, 3, 4)
4
Try it ↑
median([6, 1, 2, 3])
2.5
Try it ↑
Edge cases and null handling
median([])
null
Try it ↑
Part of FEEL list functions: how positions, nulls and single values behave across all of them, aggregating over lists of contexts, and every function side by side.
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).