3 Replies Latest reply on Jul 31, 2015 7:26 AM by philmodjunk

    Weighted Average



      Weighted Average


      Hello FileMaker Forum,

      I'm a HS teacher and am building a gradebook using FileMaker Pro 14, and I'm wondering how to do a weighted average of fields within a single record.
      For instance, if Student 1 has several fields devoted to test scores (Test 1, Test 2, Test 3, etc.), is there e.g. a way to create a calculated field called "Tests" in which Test 1 is weighted at 30%, Test 2 is weighted at 50%, and so on?
      A summary field does not appear to be the solution, since such a field averages data across records (or in my case, students), vs. dealing with averages from a single record (i.e. student).
      Thanks for any guidance!

        • 1. Re: Weighted Average

          From a database design point of view, using a set of related records for your scores all linked by studentID to a student record would make more sense and then you have the option of using summary fields and aggregate functions to get your average.

          • 2. Re: Weighted Average

            Thanks.  I'm new at this, so I think I need some more specific guidance.  It sounds like you're recommending two tables:  in table 1, the two Number fields Student ID and Student Name;  and in table 2, the fields Student ID (a lookup of some kind?) and then maybe something like the table below?  But I'm not sure what to do next.

            Student ID     Test 1 Score     Test 2 Score     Test 3 Score     Test 1 Weight     Test 2 Weight     Test 3 Weight     Weighted Avg.

            1                          76                   83                      87                      30                        100                      100                       ???

            2                          89                   93                      90                      30                        100                       100                      ???


            • 3. Re: Weighted Average

              That's not it.

              Your additional table would have just 4 fields:

              Test Score
              Test Weight
              Weighted Average Summary Field (there's an option for a summary field that computes weighted averages)

              A portal to this new table can be placed on your student layout to list these scores vertically. To list them horizontally is also possible by setting up a series of one row portals, each with a different initial row specified--producing a so called "horizontal portal".