The Power Automate Add function lets you compute the sum of two numbers.
Its counterpart is the sub function that lets you subtract two numbers.
In this article, I’ll introduce you to the add function and will provide a step-by-step guide on how to use the function in a Microsoft flow.
Power Automate Add Function
Power Automate Add Function
Compute the sum of two numbers and return the result.
Syntax
add(<summand_1>, <summand_2>)
Input parameters
- summand_1 (mandatory): The first number to add to the second.
- summand_2 (mandatory): The second number to add to the first.
Return value
- Returns the sum of the given numbers.
Power Automate Add Expression Example
add(2,1)
=> 3 // 2+1=3
// sample with use of a variable
add(variables('myNumber'),1)
How To Use The Power Automate Add Function
Follow the steps to use the Power Automate add function in a flow.
-
Create a new flow with trigger ‘Manually trigger a flow’
New flow
-
Add a new step by clicking on ‘+ New step’
Add a new step
-
Search for ‘initialize’ and click on ‘Initialize variable’
Add Initialize variable action
-
Setup Initialize variable: 1) Provide a name, 2) select type Integer, 3) Set value to 2
Setup variable
-
Add a compose by searching for ‘compose’ and clicking on ‘Compose’
Add Compose action
-
Setup compose action: 1) click into Inputs (popup appears), 2) click on ‘Expressions’, 3) set expression to ‘add(variables(‘myNumber’),1)’, 4) click on ‘OK’
Setup add expression in Power Automate
-
Do a test run
Result –