web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Put a limit on "CalcFormula = Sum ..."

(0) ShareShare
ReportReport
Posted on by 92

On the "Bank Account Ledger Entries" page, I need to create a "Balance" field, which will depend directly on the "Amount" field of each line. Basically, the formula to calculate the "Balance" field would be "Balance = Balance + Amount", so "Balance" would change in each line, as the amounts accumulate.

In the "Bank Account List" page there is a "Balance" field, which is calculated in the "Bank Account" table, in this way:

pastedimage1637705945060v1.png

pastedimage1637705974187v2.png

I need to do exactly that on the "Bank Account Ledger Entries" page, but for each line, that is, add all the "Amount" fields but only up to the date of each line.

Is there a way to limit "CalcFormula = Sum" so that it only sums up to the current line?

I am also open to other alternatives to achieve this, I am lost.

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,045 Moderator on at
    RE: Put a limit on "CalcFormula = Sum ..."

    You can use datefilter to get the sum for a spesific date or a set of dates. Here is an example from the customer table. But the date filter field is also avalible on the bank account table.

    var

       CustomerRec: Record Customer;

    begin

       CustomerRec.SetRange("Date Filter",20080101D,20081231D);  

       CustomerRec.CalcFields(Balance, "Net Change");  

    end;

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,401

#2
Sumit Singh Profile Picture

Sumit Singh 2,692

#3
YUN ZHU Profile Picture

YUN ZHU 1,935 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans