1 Reply Latest reply on Jul 16, 2012 9:21 AM by philmodjunk

    Calculating Totals for Specific Fields

    RobertMoss

      Title

      Calculating Totals for Specific Fields

      Post

      Hello,

      I am new to Filemaker, and am trying to figure out if it is possible to calculate a total for specific fields in a table.

      I have a table that keeps track of when employees have left for vacation and when they come back (the total would calculate how many days of vacation they have used up). This table would have multiple records per employee, and I want to know if I can calculate a total for a specific employee (and then use this in a formula for a related table).

      If somebody could provide some advice, that would be greatly appreciated.

      Thank you,

      Robbie

        • 1. Re: Calculating Totals for Specific Fields
          philmodjunk

          IF you have this realtionship:

          Employees::EmpID = VacationLog::EmpID

          I've named the table you describe "vacationLog" and postulated a second table, Employees where you have one record for each employee. Employees::EmpID is an auto-entered serial number.

          Then Sum ( VacationLog::Days )can be defined in Employees

          to compute the total of all vacation days used for a given employee. This can also be modified to limit the total to just those used in a given year if a different relationship is used that matches on both EmpID and a year field.