Power Automate Introduction

Here are the examples of how you can use the Math Functions from Dynamic Content in a Power Automate Flow

Min()
Minimum gives out the smallest value in the Array of numbers.

Here, I’ve created an array of numbers and from this, I’m selecting the minimum value.

Input

Power Automate

Output

Max()

Inversely as the Min() function above, the Max function will return the highest number from the Array or Collection –

Here’s how I use the Max function –

 

Input of Max

 result of the Max function

Add()

As it suggests, this is the addition function which will add the 2 numbers provided as arguments –

In the variable, I’ll look for add and enter the 2 arguments from the Manual Trigger i.e. passing values while running the Flow.
And as you can see below, I’m using add() function and passing the parameters separated by a comma.

Input

And then I run the Flow, the result is as below –

Sub()

As the function suggests, you can subtract number 2 from number 1. Here’s an example –

In the below Sub() function, I can see

Input

And when I pass the below arguments 10 and 5 –

And the result will be 10 – 5 = 5.

Rand()

Rand() function will give out a random number from the collection at each run. Hence, the result will vary on each run –

I’m providing the start number range and the end number range. And the function will select the a random number from within the range –

So, when I run it for the first time, I’ll get a number

And when I run it one more time, I’ll get a different number.

Range()

Range() function will generate a range between –

The 2 arguments required by range() function are startIndex and count. Count meaning how many numbers you want in the array.
Notice the type of the variable has been changed to an Array now.

And the result is the below Array with 6 items in the Array starting from value 2.

Mod()

Mod() function will give the modulo / modulus or the division happening between the dividend and the divisor i.e. you’ll get the remainder value –

I’m supplying the below parameters which will give a modulus.

And the result obtained is the remainder of the division –