Hello, I have an excel file that I need Power Automate to group by Account Name and total the categories. How would I attempt to do this?
For example: I want power automate to subtotal for KL and subtotal for AD.
Account Name | Amount |
KL | 500 |
KL | 100 |
AD | 100 |
AD | 300 |
Thanks! Looks like it is working kind of, but I have a couple issues. Would you know how to fix this for the Select activity because it's output gives me this KL : ""
Also, how did you code it to send an email? I was doing it for notifications before.
Hi @KJoy17 ,
Please find the flow step below:
My excel file contains the below data and is stored in SharePoint
1- Fetching the above excel from SharePoint.
2- Initialize variable to subtotal the amount for each account name
3- Select the Account Names only.
From: select the dynamic value from List rows present in a table action
Map : @item()?['Account Name']
output after running above action:
4- Get the distinct account names
Input :
5 - Iterate over output of above compose action
Select an output from previous steps : outputs('Compose_-_Get_Distinct_Account_Names')
6 - Filter the data based on account names and get all the details mapped to the given account name.
From: outputs('List_rows_present_in_a_table')?['body/value']
item()?['Account Name'] is equal to items('Apply_to_each')
7- Again Iterate over the details got from above action to calculate the amount for each account
Select an output from previous steps : body('Filter_array')
8 - Add Compose action to store Amount (initialized above )variable value
I will need it to send a notification of that subtotal if the amount is over 600 as a grand total by account name. I know how to send the notification part, but I need help on how to have power automate calculate the amounts by category.
Hi @KJoy17 ,
Can you tell us more about it. What will you do after subtotal?
Do you want to store subtotal somewhere?
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1