Power Automate Functions - Mod, Div, Mul, Sub, Add, Max, Min Function

Power Automate Functions - Mod, Div, Mul, Sub, Add, Max, Min Function

What is mod Function?

A function that returns the remainder after the division of any number

Create a New Flow:

Go to power automate select “Instant cloud floe” then select trigger option manually. Finally hi on create button.

For example:

For example, we have 20 total cars and out of total cars we have 6 cars are new cars. The remaining cars are old. Now we have to find how many cars are old?

Total / new

20/6 

The remainder is 2.

Variable One:

First of all, initialize two variables one for total cars and the other for new cars having the below attributes:

Name: Total Cars

Type: integer

Values: 20

Power Automate Functions - Mod, Div Function

Variable two:
Name: New Cars
Type: integer
Values: 6
Power Automate Functions - Mod, Div Function

Now add ‘mod function in expression editor’:
Add a compose action in thirst step
mod(variables('Total Cars'),variables('New Cars'))
Power Automate Functions - Mod, Div Function
output:
Power Automate Functions - Mod, Div Function

Div Function
What is the Div function?
Div function is a device function. Used to make a division.
For example, we have 365 days in a year
We have 7 days in a week
We have to calculate how many weeks in a year?
In that case, we have to use the div function.
Days in Year = 365
Days in Week = 7
Week in Year?
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Add a variable using initialize a variable with the following attributes
Name: Total Days In Year
Type: Integer
Value: 365
Power Automate Functions - Mod, Div Function

Add initialize variable action 2:
Name: Total Days In Week
Type: Integer
Value: 7
Power Automate Functions - Mod, Div Function

Calculate total Weeks in a Year?
Add a Compose action to calculate Total Weeks
Add ‘div function’ to compose action. Go to expression editor add following code there.
Code:
div(variables('Total Days In Year'),variables('Total Days In Week'))
Power Automate Functions - Mod, Div Function


Output:
Power Automate Functions - Mod, Div Function

Mul Function
What is mul function?
mul function is used to perform multiplication
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Name: Total Weeks In A Year
Type: Integer
Value: 52
Power Automate Functions - Mod, Div Function
Add initialize variable action 2:
Name: Total Days In A Week
Type: Integer
Value: 7
Power Automate Functions - Mod, Div Function

Add Compose Action:
Power Automate Functions - Mod, Div Function

Output:
Power Automate Functions - Mod, Div Function

Sub function
What is a sub-function?
Sub function is used to perform a subtraction between two integers or two bumpers
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Name: First Number 
Type: Integer
Value: 50
Power Automate Functions - Mod, Div Function

Add initialize variable action 2:
Name: Second Number 
Type: Integer
Value: 25q qbn 1
\q’;/.p
Power Automate Functions - Mod, Div Function

Now add a Compose Action to perform Sub Function between two Numbers:
Power Automate Functions - Mod, Div Function
Output:
Power Automate Functions - Mod, Div Function

Add Function
What is add function?
Add function is used to per addition between two numbers
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Name: First Number 
Type: Integer
Value: 100
Power Automate Functions - Mod, Div Function

Add initialize variable action 1:
Name: First Number 
Type: Integer
Value: 100
Power Automate Functions - Mod, Div Function

Now add Compose Action to perform Add Function:
Add compose action to perform add function
Power Automate Functions - Mod, Div Function


Output:
Power Automate Functions - Mod, Div Function

Max Function
What is a max function?
Max function is used to find a greater number from the list
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Name: First Number Max
Type: Integer
Value: 70
Power Automate Functions - Mod, Div Function

Add initialize variable action 1:
Name: Second Number Max
Type: Integer
Value: 60
Power Automate Functions - Mod, Div Function

Add Compose Action to perform Max Function:
Max function find a greater number from the list and return the maximum number
Power Automate Functions - Mod, Div Function

Output:
Power Automate Functions - Mod, Div Function

Min Function
What is Min Function?
Min function is used to minimum number from the list
Go to power automate create a new flow >> instant cloud flow >> trigger manually
Add initialize variable action 1:
Name: First Number Max
Type: Integer
Value: 70
Power Automate Functions - Mod, Div Function
Add initialize variable action 2:
Name: First Number Max
Type: Integer
Value: 50
Power Automate Functions - Mod, Div Function

Add a compose action :
Add compose action to perform min function 
Output:
Power Automate Functions - Mod, Div Function



0 Comments

Thanks for commenting. Your comment will be live soon after approval.