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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to calculate total...
Power Automate
Answered

How to calculate total of a SharePoint column?

(1) ShareShare
ReportReport
Posted on by 249

Feel like this should be way easier than I'm making it but I can't get this to work. I want to calculate a running total of the values in a column called Hours in a SharePoint list. This column may or may not be empty. Here is what my flow is doing

1. Initialize variable (runningTotal, Float type)

2. Get items from SharePoint list

3. Apply to each value (from Get items)

4. Increment variable runningTotal, Value = Hours (from Dynamic content)

 

Issue is that the runningTotal is the evaulating to the total number of the items in the list. When I walk through the loop, it increments by 1 for each item in the SP list from Get items

I tried adding a Condition to attempt to only add when the Hours field is not null, but I don't think I'm doing that right with the new Flow upates. I tried Hours  is greater than 0, which failed on the items where Hours was null. I tried Hours is not equal to '' which still counted everything.

Any suggestions?

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    @cooper33 :

     

    Please post a screen shot of your Flow - that will make it much easier to assist.

     

    Here is an example of now you might approach your issue.

    I have a list with a number column call Available Quantity.

    The Flow below loops through the list and adds the Available Quantity in each row to the variable.

    When the Flow is complete, the variable holds the total of all values in the Available Quantity column.

     

    iNCREMENT.jpg

     

    If this addresses your issue, please mark you post as Solved.

     

    Scott

     

  • Verified answer
    cooper33 Profile Picture
    249 on at

    Thank you for the response. The configuration in your screenshot is what I had and was trying to describe. It was only incrementing by 1 and not taking into the account of the field in the loop.

    I had to add a Condition to the loop to check if the field was not equal to null. If Yes, I incremented the value as shown in your screenshot.

  • leyburn19 Profile Picture
    2,157 on at

    Can you supply a screenshot.  No matter what I do I still only get increment by 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard