Power Automate Desktop Mathematical Operations

In this Power Automate Desktop tutorial, we will see how to perform Mathematical calculations using mathematical operators using Power Automate Desktop.

So here we will discuss the below Mathematical operator:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • AND
  • OR
  • NOT

Let’s see how we can perform a mathematical operation in Power Automate Desktop.

Mathematical Operation in Power Automate Desktop

Here we will see how to do Mathematical operations in Power Automate Desktop.

We will take two variables i.e. num1 and num2, which contain 10 and 20, respectively. Then we will perform the mathematical operations using these two numbers.

Step-1: Open Power Automate Desktop, provide the flow name, then click on Create.

Mathematical operations in Power Automate Desktop

Step 2: We will add 2 variables to the flow i.e. num1 and num2. Expand the variable section and then drag and drop the Set variable action. Then provide the below information:

  • Change the variable name to Num1.
  • Value: Provide the value as 10.
Mathematical operations in Power Automate Desktop

Similarly, following the above steps, add the variable num2 to the flow.

Power Automate Deskto0p Mathematical operations

Operation 1: Addition

Step 3: Expand the Message box section to do an addition operation between 2 numbers. Then drag and drop the Display message action to the flow. Then provide the below information.

  • Message box title: Provide the title of the message box.
  • Message to display: Provide the below code:
%Num1 + Num2%
  • Then change the variable name to ‘Addition’.
Microsoft Power Automate Desktop mathematical operation addition

Step 4: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Power Automate Desktop mathematical operation addition

Operation 2: Subtraction

Step 5: Expand the Message box section to do a subtraction operation between 2 numbers. Then drag and drop the Display message action to the flow. Then provide the below information.

  • Message box title: Provide the title of the message box.
  • Message to display: Provide the below code:
%Num2-Num1%
  • Then change the variable name to ‘Subtraction’.
Power Automate Desktop mathematical operation subtraction

Step 6: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Microsoft Power Automate Desktop mathematical operation subtraction

Operation 3: Multiplication

Step 7: Expand the Message box section to do a multiplication operation between 2 numbers. Then drag and drop the Display message action to the flow. Then provide the below information.

  • Message box title: Provide the title of the message box.
  • Message to display: Provide the below code:
%Num1 * Num2%
  • Then change the variable name to ‘Multiplication’.
Microsoft Power Automate Desktop mathematical operation multiplication

Step 8: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Power Automate Desktop mathematical operation multiplication

Operation 4: Division

Step 9: Expand the Message box section to do a division operation between 2 numbers. Then drag and drop the Display message action to the flow. Then provide the below information.

  • Message box title: Provide the title of the message box.
  • Message to display: Provide the below code:
%Num1 / Num2%
  • Then change the variable name to ‘Division’.
Power Automate Desktop mathematical operation division

Step 10: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Microsoft Power Automate Desktop mathematical operation division

Operation 5: AND

Step 11: To do the AND operation between 2 numbers, we will check if (Num1=10 AND Num2=20)=True, the condition is true, then it will display the message ‘ Both the condition are true’, else Both the condition are false.

For this, expand the conditions section, drag and drop the IF action, then provide the below information:

  • First Operand: provide the first operand as below code:
%Num1 = 10 AND Num2 = 20%
  • Operator: Select the operator as equal to
  • Second Operand:: Provide the second operand as True.
Microsoft Power Automate Desktop mathematical operation AND

Step 12: Then drag and drop the Display message action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result
Power Automate Desktop mathematical operation AND

Step 13: Now we will add the else part, so from the condition section drag and drop the Else action.

Step 14: Then drag and drop the Display message action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result.
Power Automate Desktop mathematical operation using AND operator

Step 15: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Microsoft Power Automate Desktop mathematical operation using AND operator

Operation 6: OR

Step 16: To do the OR operation between 2 numbers, we will check if (Num1=4 OR Num2=20)=True, the condition is true then it will display the message ‘ One of the conditions is true’, else if (Num1=10 OR Num2=20)=True, the condition is true then it will display the message ‘ Both the condition is true’, else Both the condition are false.

For this, expand the conditions section, drag and drop the IF action, then provide the below information:

  • First Operand: provide the first operand as below code:
%Num1 = 4 OR Num2 = 20%
  • Operator: Select the operator as equal to
  • Second Operand:: Provide the second operand as True.
Microsoft Power Automate Desktop mathematical operation using OR operator

Step 17: Then drag and drop the Display message action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result
Power Automate Desktop mathematical operation using OR operator

Step 18: Now drag and drop the ‘Else if’ action to the flow page. Then provide the below information:

  • First Operand: provide the first operand as below code:
%Num1 = 10 OR Num2 = 20%
  • Operator: Select the operator as equal to
  • Second Operand:: Provide the second operand as True.
Power Automate Desktop mathematical operation OR operator

Step 12: Then drag and drop the Display message action in between Else if action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result
Microsoft Power Automate Desktop mathematical operation OR operator

Step 20: Now we will add the else part, so from the condition section drag and drop the Else action.

Step 21: Then drag and drop the Display message action in between the else action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result
Microsoft Power Automate Desktop mathematical operation OR

Step 22: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Microsoft PAD mathematical operation OR

Operation: Not

Step 23: To do the Not operation on Num 1, if (Num1 !=11) =True, then it will return true, else false.

For this, expand the conditions section, drag and drop the IF action, then provide the below information:

  • First Operand: provide the first operand as below code:
%Num1 != 10%
  • Operator: Select the operator as equal to
  • Second Operand:: Provide the second operand as True.
Microsoft Power Automate Desktop mathematical operation NOT

Step 24: Then drag and drop the Display message action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result
Power Automate Desktop mathematical operation NOT

Step 25: Now we will add the else part, so from the condition section drag and drop the Else action.

Step 26: Then drag and drop the Display message action to show the result. Then provide the below information:

  • Message box title: Provide the message box title.
  • Message to display: Provide the message to display.
  • Then change the variable name as a result.
Power Automate Desktop mathematical operation NOT operator

Step 27: Now run the flow by clicking on the Run button. Then message box will pop up with a result.

Power Automate Desktop mathematical operation using NOT operator

Conclusion

In this Power Automate Desktop, we saw how to perform different types of mathematical operations in Power Automate Desktop.

You may like the following tutorials:

>