Number.Combinations

Updated on

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:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/number-combinations

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy