RANDBETWEEN Function (DAX)

How does the RANDBETWEEN function (DAX) work?

The RANDBETWEEN function (DAX) returns a random number in the range between two numbers you specify.

RANDBETWEEN Formula Syntax

RANDBETWEEN(
     <bottom>,<top>
)

How do you use the RANDBETWEEN function?

Use the RANDBETWEEN function to get a random integer between bottom and top. For example, =RANDBETWEEN(1,50) might generate the number 28

Related Blog Posts

Related Support Forum Posts

Dax Calculation question
Dax not working
DAX Buffer Calculation Query

Considerations when using the RANDBETWEEN function

The RANDBETWEEN function syntax has the following arguments:

Bottom(Required).-The smallest integer RANDBETWEEN will return.
Top(Required)-The largest integer RANDBETWEEN will return.

Related Video Tutorials

Formula examples using the RANDBETWEEN function

=RANDBETWEEN(1,10)

=RANDBETWEEN(-1,1)

=RANDBETWEEN(1,50)

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.