2 Replies Latest reply on Jan 6, 2009 12:20 PM by goosse

    calculate field with sum



      calculate field with sum


      I have got a problem with the sum function. My problem is the following.

      I use two tables Account and Bookings

      Account with the fields

      totamount debet
      amount credit


      Bookings with the fields



      I created a relation between accountnumber and accountnumber_debet. Second i created a relation between accountnumber and 

      accountnumber_debet (which created a view? with the name Account 2)


      the field totamount_debet i calculate with the sum(Bookings::amount) which gave me the correct amounts but now my problem i want t do the same with the field

      totamount_credit (sum(Bookings::amount)tbut that gives me wrong amounts 


      Has anyone an idea how to solve this problem, to calculate the correct amount?

        • 1. Re: calculate field with sum



          Thank you for your post.


          It may help to better understand your relationships.  It sounds like you have "Account::accountnumber" linked to "Bookings::accountnumber_debet", since it is working properly.


          In your Relationships graph, click on the bottom left icon to add a new table, and select the Bookings table.  You should now have a "Bookings 2" table displayed.


          Now, set the relationship so that "Account::accountnumber" is linked to "Bookings 2::accountnumber_credit".


          Your "totamount debet" field is working properly, so don't touch that.


          Now, create your "totamount_credit" calculation field with the formula:


          Sum (Bookings 2::amount)


          You will now get the correct result.


          If you need clarification for any of the above steps, please let me know.



          FileMaker, Inc. 

          • 2. Re: calculate field with sum

            thanks allready did that so i was on the right track but i created a layout with the table

            bookings and that was giving me the wrong results.

            I created a new layout with bookings 2 and that gave me the right results.



            thanks for your reply it was very helpfull.