Number.Combinations

Number.Combinations is a Power Query M function that calculates the number of unique combinations from a list of items with a specified combination size. The function returns the calculated number of unique combinations.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Number.Combinations(
   setSize as nullable number,
   combinationSize as nullable number,
) as nullable number

Description

Returns the number of unique combinations from a list of items, setSize with specified combination size, combinationSize.

  • setSize: The number of items in the list.
  • combinationSize: The number of items in each combination.

Examples

Find the number of combinations from a total of 5 items when each combination is a group of 3.

// Output: 10
Number.Combinations( 5, 3 )

Other functions related to Number.Combinations are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/number-combinations
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.