Number.Factorial is a Power Query M function that calculates the factorial of a given number. The function returns the factorial value of the input number.

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


Number.Factorial( number as nullable number ) as nullable number


Returns the factorial of the number number.


Find the factorial of 10.

// Output: 3628800
Number.Factorial( 10 )

Other functions related to Number.Factorial are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.