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 Apps / Calculate items in a b...
Power Apps
Unanswered

Calculate items in a balance column

(0) ShareShare
ReportReport
Posted on by 201

Hi @ALL,

 

can someone help me to understand how this calculation can be realized:

TitleIncomeOutcomeBalance
Item110 10
Item2 55
Item33 8
Item4 62

 

If I edit the "Item2" from 5 to 4. How can I update the column "balance" for all the items.

 

Thanks for help

I have the same question (0)
  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at

    Hi @dobroo ,

     

    You should be able to do this with a Power Automate flow.  Assign an order number to each row and then use Power Automate to loop (Apply to Each) through each row, in order.  Inside the Apply to Each, keep track of the balance through a Variable and update the current row to the value of the variable.

     

    This process will have a lot of Dataverse API calls so would only work for relatively small data sets that do not change that often.

     

    If you have a large dataset then holding the Balance in Dataverse and calculating with Power Automate is probably not a good idea.  Be aware of the limits.  A Power BI report might be a better solution but depends on how you want to use the Balance column.

  • dobroo Profile Picture
    201 on at

    Is their no way to do this with a calculated column or a Canvas App and Patch-Function?

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi Dobroo,

     

    You might want to utilize a child entity and have this basically be the "Transaction" and you can then have a single column for the Transaction Value and it would be negative or positive where income could be positive and outcome would be negative in the values.  

     

    You can then create a rollup column in the parent entity that will sum the values of the transactions to come up with your "Balance" value.  

     

    Hopefully this helps.


    Thanks,


    Drew

  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at

    Hi @dobroo , since you have a running balance on the line items then you can’t use calculated columns. You could do what  @dpoggemann  suggests and only have the balance shown on the parent entity and not have a running balance on the line items. It really depends on what the requirements are. Why do you need a running balance on the line items?

     

    You could possibly also achieve this with a Canvas app but it depends on how the users are interacting with the data and how it gets updated. If data is coming in via integration and not direct input from a user then a Canvas app won’t work. Give the Canvas app a try and see.

  • dobroo Profile Picture
    201 on at

    Hi @dpoggemann , @HSheild 

     

    i am not yet familiar with rollup columns and it is apparently still not possible to configure rollup columns for Teams-Apps. Or? when I go to the settings of the columns it is endless loading...

     

    I realized my scenario with a Canvas App. this tutorial helped me:

    https://matthewdevaney.com/power-apps-running-totals-in-a-gallery/

     

    Thx for your help

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @dobroo 

    Rollup columns are available for Dataverse for Teams (see the following link:  https://docs.microsoft.com/en-us/powerapps/teams/table-columns).   Details specifically to do rollups, now this is not real-time and that is something you need to be aware of.  It runs as a job on a scheduled basis and this may not meet your requirements...

    https://docs.microsoft.com/en-us/powerapps/maker/data-platform/define-rollup-fields

     

    Hope this works,


    Thanks,

     

    Drew

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard