List.Product
ListReturns the product of all numbers in a list.
Syntax
List.Product(numberList as list, optional precision as nullable number) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
numberList | list | Yes | The list of numbers to multiply together. |
precision | nullable number | No | An optional precision value. Use Precision.Double for IEEE double-precision arithmetic. |
Return Value
nullable number — The product of all numeric values in the list, or null if the list is empty.
Remarks
List.Product multiplies all values in a numeric list together and returns the result. This is the multiplicative equivalent of List.Sum. Common use cases include compound growth calculations (multiplying a series of rate factors), factorial-style computations, and scenarios where values are expressed as multipliers.
Returns null if the list is empty. Null values in the list are skipped — they do not contribute to the product and do not cause an error. Including 0 in the list produces a result of 0 regardless of other values.
The optional precision parameter accepts Precision.Double to use IEEE 754 double-precision floating-point arithmetic. This can differ from the default decimal arithmetic for very large or very small numbers, and may be needed for interoperability with systems that use double-precision math. For most business data, the default is sufficient.
Examples
Example 2: Compound growth calculation
let
GrowthRates = {1.05, 1.03, 1.08, 1.02},
CumulativeGrowth = List.Product(GrowthRates)
in
CumulativeGrowthThe final output — the cumulative growth factor after applying all four annual rates.
Result | |
|---|---|
| 1 | 1.19 |