RANDBETWEEN DAX Function in Power BI
The RANDBETWEEN DAX function returns a random whole number in the range between two numbers we specify.
DAX Syntax RANDBETWEEN(bottom, top)
The function has the following parameters:
- Bottom: The smallest integer the function will return.
- Top: The largest integer the function will return.
Example: Let’s create a calculated column. The following formula returns a random number between 1 and 10.
DAX
RANDBETWEEN Column = RANDBETWEEN(1,10)
We can see in the image below, the function generates a random value for each row in the table.
