Number.Permutations

Updated on

Number.Permutations is a Power Query M function that calculates the number of permutations that can be generated from a set of items with a specified permutation size. The function returns the calculated number of permutations.

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

Syntax

Number.Permutations(
   setSize as nullable number,
   permutationSize as nullable number,
) as nullable number

Description

Returns the number of permutations that can be generated from a number of items, setSize, with a specified permutation size, permutationSize.

Examples

Find the number of permutations from a total of 5 items in groups of 3.

// Output: 60
Number.Permutations( 5, 3 )

Other functions related to Number.Permutations are:

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