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 / Add a sum of Column fr...
Power Automate
Unanswered

Add a sum of Column from excel to word template

(0) ShareShare
ReportReport
Posted on by 37

I have created a flow that will populate a Word Template from an Excel document, creating separate documents for each client.

 

With the help of some users this has been set up and works great, I would like to add one last section which will sum a column after a filter to get a total amount for a Fee, VAT and Gross amount that will set below my repeating content control table.

 

Is it possible to sum just the values of a column in this way?

 

My current flow is below, and I will add a 3 new fields, Total Fee, Total VAT and Total Gross where the sum of each column should be populated:

Flow Update.png

 

 

Thank you!

Categories:
I have the same question (0)
  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    @FDUN89  Yes this is possible please follow below approach. In my case I am calculating sum of all values in column employee bonus. 

     

    Use increment variable under Apply to each action. . Make sure you convert the value to int or float as per your use case 

     

    LokeshBysani_0-1692104590130.png

     

  • FDUN89 Profile Picture
    37 on at

    @LokeshBysani 

     

    Hi,

     

    I am having some difficulties getting this to work.

     

    Testing just on one column for now, I added the initialize variable and added an increment as per your screenshot, I then set the Total Fee field on my Template to the variable. I got this working with the Float in the initialize variable, however it is giving me the total of all items in my excel not just the split for the individual client

  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    can you share the values you have in that column. May be a screenshot of that column

  • FDUN89 Profile Picture
    37 on at

    Sure,

     

    See screenshot below, the rest of the flow is the same just adding in the TotalFee variable into the MS template.

     

    add.png

  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    LokeshBysani_0-1692108842210.png

    Use Filter Array option and then filter based on the criteria. It provided only required rows. 

     

    Now in Apply To Each keep output of Filter Array option and then follow same steps as earlier. Now it provides the sum of only that few records. 

  • FDUN89 Profile Picture
    37 on at

    Thanks,

     

    I am still pretty new to Power Automate so I am having difficulty setting this up when I already have a filter array within my existing apply to each to split out the document by Agent.

     

    I cannot figure out where to add the additional Filter so that nothing else stops working, or if I can use the existing one?

     

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard