# Power Automate Rand Function Explained

The Power Automate Rand function generates a random integer number for a given number range.

In this article, Iâ€™ll introduce you to the rand function and will provide a step-by-step guide on how to use the function in a Microsoft flow.

## Power Automate Rand Function

Generate a random number within a given range, where the lower bound is included but the upper bound is excluded.

### Syntax

rand(<minValue>, <maxValue>)

#### Input parameters

• minValue (mandatory): The integer with the lowest value in the range.
• maxValue (mandatory): The integer immediately succeeding the one with the highest value within the range that the function can produce.

#### Return value

• Returns a random integer generated from the given range.

### Power Automate Rand Expression Example

How do you generate a random number in power automate? Here is an example how to generate a random number between 1 and 10.

rand(1,11)
// can be any number from 1 to 10 => 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10

## How To Use The Power Automate Rand Function

Follow the steps to use the Power Automate Rand function in a flow.

New flow