2 Replies Latest reply on Mar 28, 2012 11:16 AM by GregoryLypny

    Summaries for groups of records



      Summaries for groups of records


      Hello everyone,

      I'm putting together a course database to manage the grades of thousands of students covering years of courses.  When sending out reports to them and for my own viewing, I like to see summary statistics, such as the number of students in the class and the average, median and standard deviation of the grades for each assignment beside the grade of the student whose record I am viewing.  I know that this is easy to do using summary fields but the summaries depend on the found set and only show the correct stats for the class of the student in question if the found set is that class; if I look up one particular student, the found set will be that one record and the summary fields will show the grades of that one student rather than the class.  I'm thinking to creating a self-join and using summaries of portals to do the job, but I am wondering whether there are other ways I should look into.  I know that some dynamic calculations slow down FileMaker, and I'd like to keep the database speedy.

      Any thoughts would be much appreciated,



        • 1. Re: Summaries for groups of records

          You have two options depending on the design of your layout and their respective tables.

          If you pull up multiple classes in one found set and sort them by class, you can put the summary fields in a sub summary part "when sorted by" class and you'll get summary values for each class.

          If you set up a relationship that matches by the class field, then either aggregate functions or summary fields can be used to report your statistical values for all related records.

          This doesn't actually require using a portal if the relationship is sufficient to match to your set of related records. Sometimes a one row portal with a summary field in it is useful when you need to use a portal filter to get the correct group of related records to summarize.

          • 2. Re: Summaries for groups of records

            Yes, thanks.  I've been away from FM for some time, but I recall doing this for a project a few years ago.  A relationship and portals it is.