Power Automate Add Function Explained

Power Automate Add Function

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
Power Automate add expression

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.

  1. Create a new flow with trigger ‘Manually trigger a flow’

    power automate add function create new flow

    New flow

  2. Add a new step by clicking on ‘+ New step’

    power automate add function add new step

    Add a new step

  3. Search for ‘initialize’ and click on ‘Initialize variable’

    power automate add function init variable

    Add Initialize variable action

  4. Setup Initialize variable: 1) Provide a name, 2) select type Integer, 3) Set value to 2

    power automate add function setup init variable

    Setup variable

  5. Add a compose by searching for ‘compose’ and clicking on ‘Compose’

    power automate add function add compose

    Add Compose action

  6. 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’

    power automate add function setup compose

    Setup add expression in Power Automate

  7. Do a test run

    power automate add function test run

    Result –

Leave a Comment

Your email address will not be published. Required fields are marked *