cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to create a simple flow to count total amount

Hi all,

 

I have a SharePoint List as similar as below, for same invoice, it is using same currency

 

Invoice:

CompanyInvoice NoInvoice DateCurrency
AIN0000011/1/2021USD
AIN0000021/1/2021USD
AIN0000031/2/2021EUR

 

Invoice Item:

Invoice NoItem TypeAmount
IN000001CPU2020
IN000001Ram101
IN000001Hard disk1010
IN000001CPU2030
IN000002Ram203
IN000003Windows License1234
IN000003CPU1234

 

When I trigger the flow for company A, it should sum all Invoice item with same invoice no and item type into single cell and sum the column with same currency into total. The column items is fixed and total rows is dynamic base on how many currency involved as below:

Invoice NoCurrencyCPURamHard diskWindows LicenseOthers
IN000001USD4050101101000
IN000002USD0203012340
IN000003EUR12340000
TotalUSD4050304101012340
 EUR1234000

0

 

I can do it with filter query to get which SharePoint item need to be sum and couple of loops to calculate the value for each cells in the table (including each invoice item, total currency and total amount). However, it is a huge performance issue.

 

Any better idea to save the data in single/few loop and output into html table?

2 REPLIES 2
jinivthakkar
Super User
Super User

@Anonymous when you flow for Company A, you want all entries with the total in an email ? Is this what you are trying to do?

Anonymous
Not applicable

yes, that's what I am trying to do

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (5,082)