Mathematical Functions in Power Automate

Mathematical functions are the same as you expect. They allow you to add, subtract, multiply, and perform other similar functions. (eg: add() , mul(), max()).

Mathematical FunctionsDescription
addReturns the sum of two numbers.
divReturns the division of two numbers.
maxReturns the maximum value from an array.
minReturns the minimum value from an array.
modReturns the remainder by dividing two numbers.
mulReturns the product of two numbers.
randReturns a random integer from a range of numbers.
rangeReturns an integer array or set of numbers that start from a specified integer.
subReturns the subtraction of two numbers.

Let's see how we can use these functions in a flow.

  • Go to Microsoft Power Automate. Sign in to your account.
    power-automate-home-page3
  • Create a Manually Triggered Flow. Add two number inputs. Click on the New step.
    input-number-next-math-power-automate
  • Select the Initialize variable from actions. Name the variable as Sum, choose Type as an Integer. Click on the Add dynamic content.
    sum-var-math-power-automate
  • Go to Expressions. To add two numbers we use add() function.
    We use the following expression to add both numbers:

    add(triggerBody()['number'],triggerBody()['number_1'])
  • Add this expression in Expression (Add dynamic content) and click on OK.
    expression-math-power-automate
  • Click on Save and Run the flow.
    sum-save-math-power-automate
  • Enter two numbers to add and click on Run flow.
    output-number-next-math-power-automate
  • We get the sum of the two numbers entered as the output.
    output2-math-power-automate
About Author :

I am Sharvari Raut, having sound knowledge and experience in technical writing. Currently, pursuing my B.Tech in Computer Science and Engineering.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions