If you want to multiply every number in a list together and get a single result, the List.Product function is what you reach for. It takes a list of numbers and returns their product. Available in Excel (Power Query), Power BI Desktop, and Power BI Service.
Syntax of List.Product Function
List.Product(numbersList as list, optional precision as nullable number) as nullable number
where
numbersList(required, list). The list of numbers you want to multiply together, like{2,3,4}or a table column.precision(optional, nullable number). Controls the calculation accuracy. Leave it out and it usesPrecision.Double, the standard binary floating point math. PassPrecision.Decimalfor higher precision on decimal-heavy lists where float rounding would otherwise creep in.
Returns: a number, the product of the non-null values in the list. If the list is empty, or holds only null values, it returns null.
In plain terms, you hand it a list of numbers and it multiplies them all into one value.
Example 1: Multiply a few numbers together
Multiply 2, 3, and 4 into a single product.
let
Source = List.Product({2,3,4})
in
Source
Result: 24
That is just 2*3*4, which works out to 24.
Example 2: Multiply a column of growth factors
A common real-world use is compounding a series of growth factors, where each month multiplies onto the last.
Say you have a GrowthFactors query with a Month and a Factor column, and you want the combined growth across all four months.
Here is the starting data:
| Month | Factor |
|---|---|
| Jan | 1.05 |
| Feb | 1.1 |
| Mar | 0.95 |
| Apr | 1.08 |
Pass the Factor column straight into List.Product:
let
Source = Excel.CurrentWorkbook(){[Name="GrowthFactors"]}[Content],
Result = List.Product(Source[Factor])
in
Result
This multiplies all four factors into one compound figure.
Result: 1.185030
So the combined effect is a 1.18503 multiplier, roughly an 18.5% net gain across the four months.
Example 3: Multiply a list of probabilities
The same idea covers chaining probabilities. You multiply the odds of each independent event to get the odds of all of them happening.
let
Source = List.Product({0.5,0.4,0.2})
in
Source
Result: 0.04
Multiplying 0.5*0.4*0.2 gives 0.04, so there is a 4% chance all three events happen.
Example 4: Nulls in the list are ignored
If the list has null values mixed in, List.Product skips them and multiplies only the actual numbers.
let
Source = List.Product({4,null,5,null,2})
in
Source
Result: 40
The two null entries are dropped, so this is just 4*5*2, which is 40.
Example 5: An empty list returns null
Multiplying an empty list does not return 1. Since there are no non-null numbers to multiply, the result is null.
let
Source = List.Product({})
in
Source
Result: null
The same happens for a list that holds only null values, since nothing is left after the nulls are skipped.
Things to keep in mind with List.Product
- An empty or all-null list returns
null, not1. If your pipeline might feed an empty list, guard it:(if List.IsEmpty(myList) then 1 else List.Product(myList))to fall back to a neutral1. You can check the length first withList.Count. - Every item must be a number. A text value like
"4"throwsExpression.Error: We cannot convert the value "4" to type Number.Convert the column withNumber.FromorList.Transformfirst. - Big lists can overflow into scientific notation. Multiplying many values quickly produces huge numbers, which Power Query shows as
1.2E+15. That is the value, just formatted in exponential form. - Use
Precision.Decimalwhen float drift matters. On long decimal lists the defaultPrecision.Doublecan leave a tiny rounding tail.List.Product(myList,Precision.Decimal)keeps more accuracy when you need exact decimals.
Common questions about List.Product
What is the difference between List.Product and List.Sum?
List.Product multiplies the numbers in a list, while List.Sum adds them. Both ignore null values and both return null for an empty list.
Can I multiply a single table column without converting it to a list first?
Yes. A column reference like Source[Factor] already returns a list, so you can pass it straight into List.Product (Example 2). No extra conversion step is needed.
What if I need more than a plain product, like multiplying with a condition?
When the running logic is more than a straight multiply, reach for List.Accumulate instead, which lets you carry a running value and apply any logic you want at each step.
List of All Power Query Functions
Related Power Query Functions / Articles: