FACT
The factorial of a whole number.
Group: Math. Compatible with DAX.
Syntax
FACT ( <number> )
| Parameter | Type | Description |
|---|---|---|
number | Number | A number of 0 or more; its decimals are dropped. |
Returns
Number. The factorial: 1 × 2 × 3 × … up to the number.
Remarks
- Decimals are cut off first:
FACT ( 5.9 )isFACT ( 5 ), 120. FACT ( 0 )is 1, and so is the factorial of a blank.- A negative number is an error. From 171 up the result is too large for a number, and an error too.
- It counts the orders a set can be put in: ten crates can stand in a row in
FACT ( 10 )ways.
Examples
Factorials
EVALUATE
ROW (
"5!", FACT ( 5 ),
"0!", FACT ( 0 ),
"Of 5.9", FACT ( 5.9 ),
"10!", FACT ( 10 )
)
| 5! | 0! | Of 5.9 | 10! |
|---|---|---|---|
| 120 | 1 | 120 | 3628800 |