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 / Cumulative Sum - Share...
Power Automate
Answered

Cumulative Sum - Sharepoint Lists

(0) ShareShare
ReportReport
Posted on by 4

I have a Sharepoint list similar to the one below

 

Column 1Column 2Reset?
1158No
22856No
348916Yes
4368No
52862No
615889No
765686Yes
8656No
96591No
109982No

 

I would like to have a running total of column 2. I can do this with a calculated column that only takes the values of the "Yes" condition of the reset? column. However, I also want the last value in Column 2 - even if the reset? column is "No". 

 

Is this possible?

 

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

    @Jammie1000000 

    You can get to where you want to go but it will be complicated.  First, you'll need to store the total somewhere such as another SharePoint list.  Then, you'll need logic to determine whether an entry in you list is a new entry is a new entry or an update,  If it is a new entry, then you'll simply add the number into the total.  If you are modifying an existing entry, you'll need to know the previous value so that you can back it out.  To know the previous value, you'll either need to call the SharePoint API to retrieve the previous version on the list entry or store a copy of the old value in another (hidden) column in your list that will need to be updated.  Finally, you'll have an issue when/if an item is deleted.  In that case you'll need to call the SharePoint API for the previous version.  Very messy....

     

    Let me know if you intend to pursue this and I'll provide resources that demonstrate how to get the previous version of a list item by calling the SharePoint API.

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at

    Hi @Jammie1000000 ,

     

    If you want to calculate the total of the column 2 fields contained in the Yes item, you could use Increment variable action to accumulate the value.

    You could also add another branch, set Order By and Top Count in Get items action to get the value of Column 2 field contained in the last item.

     

    Image reference:

    19.PNG20.PNG

     

    Please take a try.

     

    Best Regards,

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard