Number.Random is a Power Query M function that generates a random number between 0 and 1. The function returns the generated random number.

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


Number.Random() as number


Returns a random number between 0 and 1.


Get a random number.

// Output: 0.919303

Learn more about Number.Random in the following articles:

Other functions related to Number.Random 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.