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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,759)