Introduction
This article will discuss how to sum up 4 lookup fields in a SharePoint list and add the result in a new column using Power Automate (previously known as Microsoft Flow).

Step 1

Create a SharePoint list called “Lookup List” that contains 3 lookup fields named L-A L-C, and L-F, and a “Result” column where we will get the sum.

Step 2

Create a new flow in Power Automate and select the SharePoint trigger you want to use, such as “When an item is created or modified.”

Search in the box When an item is created or modified

After we need to the data for the list.

Add the “Get item” action and specify the site address and list name.

Add a “Compose” action and enter the formula to sum the lookup fields. For example, the formula for summing the fields L-A,L-C, and L-F would be:

add(add(int(triggerOutputs()?[‘body/L_x002d_A/Value’]),int(triggerOutputs()?[‘body/L_x002d_C/Value’])),int(triggerOutputs()?[‘body/L_x002d_F/Value’]))

This formula retrieves the values of the lookup fields using the “Get item” action and adds them together using the “add” function. The “int” function is unnecessary as the lookup values are already integers.

Add the “Update item” action and specify the site address, list name, and item ID you want to update.

In the “Update item” action, map the “Result” column to the output of the “Compose” action.

Save and test the flow.

When a new item is created or modified in the list, the flow will retrieve the values of the lookup fields, sum them up, and update the “Result” column with the result.

Here the result form the Share Point list.

 

For any Help or Queries Contact us on info@crmonce.com or +918096556344