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 / How Sum Dataverse Fiel...
Power Automate
Answered

How Sum Dataverse Fields Rows?

(0) ShareShare
ReportReport
Posted on by 10

Hi, 

i have searched the internet, tried several approaches, i can't manage to sum the fields of a dataverse query, maybe someone can help me. SumCost is 0 every time, i have no more ideas what can i do for sum the rows of my dataverse query. Thanks you.

 

I have the following flow:

 

1.1.2.2.3.3.4.4.

regards peter

 

Categories:
I have the same question (0)
  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    Can you show what you are doing in "ComposeExcelRow" and the "Set Temp SumCost Var" actions?

     

    Instead of trying to add variables together, try using the "Increment Variable" action. It is basically like adding, but you only need one action. You wouldn't need to manage multiple variables. You could have a single variable and Increment it each time.

     

    • Initialize Variable - SumCost
    • Apply to Each - Dataverse Row
      • Increment Variable - SumCost - by dataverse row data

     

     

  • PeterKa Profile Picture
    10 on at

    Hi, thanks for you answer, 

     

    this try i get it from: How to Sum an Array in Power Automate - Power Tech Tips

     

     

    pa5.png

     

    i tried now with increment variable, but still be 0... now i'm not sure if the dataverse Result rows are the problem, 

    what i would do, is list each day of a month, and summary the line items for this day. In Dataverse Table i have only 4 entries for the month i'm testing, perhaps this is my problem, i will check this 

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    I would suggest you try this method using XPATH: https://www.tachytelic.net/2021/06/power-automate-instant-sum-array/ it's much simpler and more efficient that running loops

  • PeterKa Profile Picture
    10 on at

    let me say that increment variable works, however i find the loop quite slow, i will try the method with the arrays, thank you both very much

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