web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Seeking Solution for C...
Power Automate
Unanswered

Seeking Solution for Calculating Total Cost for Multiple Items in Excel Using Power Automate

(1) ShareShare
ReportReport
Posted on by

Objective: I have a form that functions as an order sheet, with data transferred to an Excel sheet. In the Excel sheet, I maintain a list of items and their respective prices in a 'Menu Costs' sheet. My aim is to create a formula or modify a Power Automate workflow to calculate the total cost for a list of items extracted from Power Automate. These items are enclosed within square brackets and separated by commas when multiple items are selected.

 

Menu Cost:

 

Screenshot 2023-09-19 at 13.08.04.png

 

Current Formula for a Single Item: =VLOOKUP(E2,'Menu Costs'!A:B,2,FALSE)*C2

 

Sheet 1:

 

Screenshot 2023-09-19 at 13.06.53.png

 

Form question for food options: 

 

Screenshot 2023-09-19 at 14.32.26.png

 

Question: Can Power Automate be utilized to calculate the cost for multiple items within the 'Food Options' column and accumulate them into the 'Total Cost' column?

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @AB21 ,

     

    Here's a working solution from another question I answered last week; works good!

     

    trice602_0-1695133387240.png

     

    Initialize two variables as shown below.

     

    trice602_1-1695133428889.png

     

    trice602_2-1695133459981.png

     

    Here's the expression for temp1 above:

     

    add(variables('sumtotal'),int(item()))
     
    This works well and will loop through your array and add up the numbers.  I like this option very much and is my current go-to model.
     
     
  • AB21 Profile Picture
    on at

    Hi @trice602 Thanks! So where does the output go? I need go into the excel if thats possible? I also need this display the items in a column "Food option" and and displays the cost in the column cost. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard