List.Product Function (Power Query M)

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 uses Precision.Double, the standard binary floating point math. Pass Precision.Decimal for 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:

MonthFactor
Jan1.05
Feb1.1
Mar0.95
Apr1.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, not 1. 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 neutral 1. You can check the length first with List.Count.
  • Every item must be a number. A text value like "4" throws Expression.Error: We cannot convert the value "4" to type Number. Convert the column with Number.From or List.Transform first.
  • 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.Decimal when float drift matters. On long decimal lists the default Precision.Double can 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:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.