web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / To show the sum of all...
Power Automate
Unanswered

To show the sum of all prices of books

(0) ShareShare
ReportReport
Posted on by 53

Hello Dear Flow People,

Here what I am doing is that there is my custom entity i.e "Books" so I am obtaining all books records and creating the HTML table and adding all obtained fields to that Table and showing that HTML table as Body of an email and sending it to specific users.

But I am stuck where I need to do the addition of all books prices and show it as Total or Sum in row of HTML table ??

Looking forward to hear from you all

 

1.JPG2.JPG3.JPG

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,852 Most Valuable Professional on at
    Re: To show the sum of all prices of books

    Hi,

     

    Please have a look at this link below.

     

    https://flow.microsoft.com/en-us/blog/calculate-running-totals-and-tracking-maximum-values-in-flow/

     

    Thanks

  • manuelstgomes Profile Picture
    6,625 on at
    Re: To show the sum of all prices of books

    HI @JabbarCRM 

     

    I think we need to created a Loop of the data and increment a variable with that.

     

    Just do the following:

    1. Create a numeric variable
    2. For Each value in Book Records
    3. Increment the variable with the price

    Then include that in your email.

     

    Makes sense?

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: To show the sum of all prices of books

    Hi @JabbarCRM,

     

    There are many posts about how to sum the prices in the table if you want to add the sum into the table, you should initialize the output of Select action as an array variable:

     

    1. I get these data from a SharePoint list instead of CDS, and initialize an array variable named Table. At the same time, I initialized an integer variable named Sum.

    Annotation 2019-12-17 161125.png

    2. After that, create an Apply to each action to loop through all the items of the table, if the Price property is not null, use the increment variable action to increase the Sum variable:

    Annotation 2019-12-17 161238.png

     3. After get the sum of price, create the following JSON and append to array variable. Then you can put the table variable into your email.

    Annotation 2019-12-17 161249.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard