List.Median

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns the median item from a list.

List.Median(values as list, comparisonCriteria as any) as any  

ArgumentDescription
valuesThe List to check.
comparisonCriteriaThe comparison criteria to use.
  • If the list is empty, an Expression.Error is thrown.

  • If there is an even number of items, the function chooses the smaller of the two median items.

List.Median({5, 3, 1, 7, 9}) equals 5  

Show: