August 12, 201114 yr Hello I am a total newby on filemaker. i have a table that is designed to a debits and credits field in a list. I use the summary function to addition all of the credits and another to addition for the debits. I have a 3rd field summary field that gives me the total difference of both fields. Obviously, this running total result is repeated in each table entry. I am struggling to have a running total where each entry progressively adds or subtracts from the sum of all the previous entries. This would give me a result like a bank statement, telling me what the consequences of each entry are on the sum up until that point. I am not sure how clear this is, but in excel it is as simple subtracting or adding from the sum cell of a column. Many thanks for any ideas
August 12, 201114 yr I'd do this with a single "amount" field that has a positive or negative amount entered depending on whether the entry is a credit or debit. Whether a credit is negative or positive depends on your business rules: for bank customers, credits are positive (customer has money to spend) while for the bank, credits are negative (the bank owes the customer money).
August 12, 201114 yr Continuing what Vaughan said: define a calculation field cAmount = Received - Spent, and a summary field = Total of cAmount, running.
August 12, 201114 yr I think what he is looking for is the ability to select any particular entry and see the balance at that point in time, back from time immemorial. Per Vaughn, it would be easier with just one field for debits/credits with positives and negatives. If you create a self relationships relationship where for both credits and debits, posting date in the related records are less than or equal to the current posting date, you can then sum the related debits and credits relative to that particular record. ie: sum of all debits with dates less than or equal to the current posting date. Sum of all credits with dates less than or equal to the current posting date. I am not sure whether you just have one field for the posting date or separate fields for debits and credits, so I really can't go further than that.
August 12, 201114 yr There is actually no date field in the table. This seems to be limited to a specific project and/or budget year - so I'd say stay with a summary field, until proven otherwise.
August 13, 201114 yr Author Many thanks for all the suggestions. Admittedly I had forgotten to put a date field. That is done. In the end I found my solution courtesy of LaRetta as described below. Many thanks again for your time. ------ It would be easier if you used one field for debit/credit (debit plus amount; credit minus amount). Delete your last field sTotalGlobal and add field (type calculation) called cLineDiff (result is number) with MontantReceites - MontantDepense, selecting your regular fields and not the summary fields. Now create a summary field sRunning (which is Total of cLineDiff and at bottom, checkbox 'running.' If you used only one field, you wouldn't need that calculation at all because the summary would reference only one field (your amount).
Create an account or sign in to comment