1 Reply Latest reply on Sep 22, 2011 1:12 PM by philmodjunk

    Total one field in specific records during a time period

    WalterBarrueto

      Title

      Total one field in specific records during a time period

      Post

      FMP 10 on PC and Mac

      Employees log their time in FMP.  There is one table that has all of the fields to log their time for each day of the pay period.  This table is called "time".  Each employee has one record and then a new record is made for the pay period.  So if there are 10 employees and we are in week 26 of the year, there are 260 records in this table.

      A supervisor can monitor the totals of the current pay period in another table called "TimeTotals".  One record is made in this table for each pay period.  Each record contains the name of each employee and the total hours and other information that are specific for just that pay period.  Using the previous example, there are 10 employees and we are in week 26 of the year, there are only 26 records in this table.  All of the information in each record is specific to just the pay period of that record.

      Hopefully that all makes sense.  How can I easily add a new calculation where I total information for each employee, but the total will only include information from January 1 of the current year to today?  For example, I want to total personal time for each employee starting from January 1 of this year to today.  How would I go about writing a calculation to receive this information?

        • 1. Re: Total one field in specific records during a time period
          philmodjunk

          The structure of your tables leaves a lot of room for improvement. I'd use one record for each employee for each day instead of what you have.

          Using the first table as designed, I must assume that you have some kind of caculation field that totals up all the time for that one record.

          If you define a summary field that computes the total of this calculation field, it will compute total time over all the records in your current found set. Find all the records for a specified employee for a specified range of dates such as Jan 1 to today and it will report your total.

          Perform your find for the range of dates only, sort the records by employee and you can place this same summary field in a sub summary part "when sorted by" employee to get year to date totals for all employees in a single report.