List.Median
Syntax
List.Median(list as list, optional comparisonCriteria as any) as any
About
Returns the median item of the list list
. This function returns null
if the list contains no non-null
values. If there is an even number of items, the function chooses the smaller of the two median items unless the list is comprised entirely of datetimes, durations, numbers or times, in which case it returns the average of the two items.
Example 1
Find the median of the list {5, 3, 1, 7, 9}
.
Usage
powerquery-mList.Median({5, 3, 1, 7, 9})
Output
5
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for