DAX Function Guide

RAND
Empty image or helper icon

Sam McKay

CEO & Founder

How does the RAND work?
The RAND function (DAX) returns an evenly distributed random number greater than or equal to 0, and less than 1. Every time the cell containing that function is recalculated, the number returned changes.
RAND Formula Syntax

RAND()

How do you use the RAND?

RAND()

Related Blog Posts

Loading

Considerations when using the RAND?

RAND and other dynamic functions with no fixed values are not recalculated at all. For example, execution of a query or filtering will not usually cause re-evaluation of such functions. Moreover, when the entire column is recalculated, the results for those functions will be recalculated. Such circumstances involve updating from an external data source or manual data editing triggering re-evaluation of formulas containing certain functions.

In addition, RAND is always recalculated when the function is used to define a variable.

Furthermore, the RAND function can not return a result of zero in such contexts in order to avoid errors such as zero division.

Related Video Tutorials

Loading

Formula examples using the RAND

=RAND()*(int1-int2)+int1

=RAND () * 100

returns 51.2418613788544.

Related Courses

Loading