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
Number.Combinations( setSize as nullable number, combinationSize as nullable number, ) as nullable number
Returns the number of unique combinations from a list of items,
setSize with specified combination size,
setSize: The number of items in the list.
combinationSize: The number of items in each combination.
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: