Table of contents
TOC
Collapse the table of content
Expand the table of content

List.Average

Owen Duncan|Last Updated: 4/19/2018

About

Returns an average value from a list in the datatype of the values in the list.

List.Average(list as list) as any  

Arguments

ArgumentDescription
listThe List to check.

Remarks

  • If the list is empty, an Expression.Error is thrown.

Examples

List.Average({1, 2, 3}) equals 2  
List.Average({#duration(0, 0, 30, 0), #duration(0, 0, 40, 0)}) equals #duration(0, 0, 35, 0)  
List.Average({#date(2011,1,1), #date(2011,1,2), #date(2011,1,3)})  equals #datetime(2011,1,2)  
List.Average({}) equals null  
© 2018 Microsoft