List.Average
ListReturns the average of the values in a list.
Syntax
List.Average(list as list, optional precision as nullable number) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
list | list | Yes | The list of numeric values to average. |
precision | number | No | Precision mode. Use Precision.Double (0) or Precision.Decimal (1). |
Return Value
number — The arithmetic mean of the numeric values in the list.
Remarks
List.Average returns the arithmetic mean of a list of numbers. Null values are ignored in the calculation. If the list is empty or contains only nulls, the function returns null.
The optional precision parameter controls numeric precision: Precision.Double (default) uses floating-point arithmetic; Precision.Decimal uses exact decimal arithmetic and is slower but avoids floating-point rounding errors.
Examples
Example 2: Average a table column
let
Amounts = Table.Column(Sales, "Amount"),
Avg = List.Average(Amounts)
in
#table({"AvgAmount"}, {{Avg}})Applied Steps
The final output — wraps the average in a single-row table labeled AvgAmount.
AvgAmount | |
|---|---|
| 1 | 339.60 |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks