PERMUT
The number of ways to arrange a number of items chosen from a set, order counting.
Group: Math. Compatible with DAX.
Syntax
PERMUT ( <number>, <number_chosen> )
| Parameter | Type | Description |
|---|---|---|
number | Whole number | How many items there are. |
number_chosen | Whole number | How many are picked, in order. |
Returns
Number. How many ordered rows of that many items can be made, each item used once at most.
Remarks
- Gold, silver and bronze among ten brewers:
PERMUT ( 10, 3 )is 720. - It is
COMBIN ( number, number_chosen )timesFACT ( number_chosen ): every group, in every order. - Both numbers are rounded to whole numbers first, a half away from zero. Picking none gives 1; a negative number, or picking more than there are, is an error.
Examples
Podiums and pairs in order
EVALUATE
ROW (
"Podiums of 10", PERMUT ( 10, 3 ),
"COMBIN times FACT", COMBIN ( 10, 3 ) * FACT ( 3 ),
"Ordered pairs of 5", PERMUT ( 5, 2 )
)
| Podiums of 10 | COMBIN times FACT | Ordered pairs of 5 |
|---|---|---|
| 720 | 720 | 20 |