Number.RandomBetween is a Power Query M function that generates a random number between two given numbers, bottom and top. The function returns the generated random number within the specified range.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Number.RandomBetween(
bottom as number,
top as number,
) as number
Description
Returns a random number between bottom
and top
.
Examples
Get a random number between 1 and 5.
// Output: 2.546797
Number.RandomBetween( 1, 5 )
Related articles
Learn more about Number.RandomBetween in the following articles:
- Generating Random Numbers in Power Query
Generate random numbers, letters, dates, & symbols in Power Query. Find out how to prevent duplicates & generate lists of random values. » Read more
Related functions
Other functions related to Number.RandomBetween are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy