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 / Increment variable giv...
Power Automate
Unanswered

Increment variable giving wrong result

(0) ShareShare
ReportReport
Posted on by
 

I got dynamic custom HTML table generated through flow getting data from SharePoint list based on filter query as shown in below fig. Here I am able to get filter data in dynamic HTML table but I could not got the way to get Total sum value from Budget. It is giving wrong result. 

 

I tried increment variable but its not giving exact results

1st iteration , i got correct result but in 2nd iteration it is adding result of 1st iteration as well. Any idea how to solve this? IS this possible????

flow-r (2).png3.JPG

Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @sgr ,

     

    Are you filtering the data by code first and then summing the data .

     

    Thanks

  • rsaikrishna Profile Picture
    3,703 on at

    @sgr 

     

    Please check the flow execution result and check how many items the Get Items action returned in every iteration. If the Get Items return more than you expected, then something wrong in the Filter Query in Get Items action. Once you correct it, everything will be fine.

     1.JPG

     

    Please let us know if you have any more questions.

     

    Regards

    Krishna Rachakonda

    If my reply helped you solving the issue, please mark the reply as Accepted Solution.

     

  • sgr Profile Picture
    on at

    @ManishJain  That what i wanted; and filtered the data first and convert to HTML.
    The HTML output is fine; all the budget amount in row/column are correct result.

    Only problem is sum. 

     

  • sgr Profile Picture
    on at

    @rsaikrishna  as show in figure, it produced two output

    in 1st output total budget sum is correct, in 2nd output it is summing total budget from previous output as well.

     

    the html output is correct, i have no issues with that; it shows budget and project correctly.

     

     

  • rsaikrishna Profile Picture
    3,703 on at

    @sgr 

     

    In the Apply to each, before setting a variable, place a Compose action.

    In the compose action, place the expression from the variable.

    Then, set the variable value to the output of Compose.

    5.JPG

     

    NOTE: variables can not be used to set values to itself in a loop.

     

    Please give a try and let me know if this works for you.

     

    Regards

    Krishna Rachakonda

    If my reply helped you solving the issue, please mark the reply as Accepted Solution.

  • MJain Profile Picture
    2,450 on at

    Hi @sgr,

     

    Please use the following url to compute the sum :

     

    https://powerusers.microsoft.com/t5/Building-Flows/Calculate-sum-of-multiple-numbers/td-p/334399

     

    Thanks

  • sgr Profile Picture
    on at

    @rsaikrishna 

     

    You mean this? i got same result as before

    rs-sugg.JPG

  • rsaikrishna Profile Picture
    3,703 on at

    @sgr 

     

    Something is missing from your screen shot.

     

    Can you please share your entire Apply to each condition? I do not see where you are adding the values?

     

    Regards

    Krishna Rachakonda

  • sgr Profile Picture
    on at

    @rsaikrishna  here is the full one..

    New Project (15).jpg

  • Verified answer
    rsaikrishna Profile Picture
    3,703 on at

    @sgr 

     

    Do you have any more flow actions after "Increment Variable" action?

     

    Regards

    Krishna Rachakonda

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard