RANDBETWEEN

The RANDBETWEEN function returns a random integer between two specified values. It generates a number within the defined range each time the function is evaluated and is commonly used in simulations, sampling, and testing scenarios where random data is required.

Syntax

RANDBETWEEN(value1, value2)

Arguments

  • value1: The smallest integer that RANDBETWEEN returns.
  • value2: The largest integer that RANDBETWEEN returns.

Return value

Returns a random integer between the specified minimum and maximum values.

Example

RANDBETWEEN(52, 110)

In this example, the Rand Between measure is created using the RANDBETWEEN function, which generates a random integer between 52 and 110.

Excel equivalent

RANDBETWEEN

Fabric Plan
Enterprise planning, integrated with PowerTable and Intelligence, native to Microsoft Fabric. Co-engineered with Lumel.
CERTIFIED BY
Fabric Planning is certified by IBCS
Microsoft, Azure, Copilot, Excel, Fabric IQ, Microsoft Entra, Microsoft Fabric, Microsoft Teams, OneLake, Outlook, Power Automate, Power BI and SharePoint are trademarks of the Microsoft group of companies. IBCS is a registered trademark of IBCS Association. All other trademarks are the property of their respective owners.

This community is operated independently by Lumel. Nothing on this site constitutes a representation or warranty by Microsoft.