Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to calculate a Balance, or SUM a field total so It can be shown on a form

Posted on by 5

Hello All

I am struggling with this requirement. We have a Form where we want to enable people to see their current Balance, I was tasked to create this field that will sum totals of each record depending on the status of the record. If Status is pending then the amount must be added and so on.... until it reaches the last record. How to obtain that output, Been reading and found out about rollup fields and calculated but dont know which one should I go for. Just to mention i am new to this Dynamics world.

Btw we are displaying this on a Dynamics Portals website

Dynamics365.png

  • Suggested answer
    RE: How to calculate a Balance, or SUM a field total so It can be shown on a form

    Hi RicardoC,

    So may I assume, you have a parent entity, and a child entity. The child entity stores data like transaction with amount field and status field. And in your parent entity, you need to show the 'Current Balance' value? And the formula is, Parent record's 'Current Balance' = Sum(All child record's amount if its status = Pending)?

    If my understanding is correct, I would suggest you to use rollup field. Please refer to this article for more details. https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-rollup-fields#aggregate-data-for-a-record-from-related-records

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans