cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WalterFlow
Advocate III
Advocate III

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
Memorable Member
Memorable Member

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

yes, that's what I am trying to do

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (55,908)