1 Reply Latest reply on Jan 12, 2012 12:23 PM by philmodjunk

    Summing Filtered Portals

    TedKraus

      Title

      Summing Filtered Portals

      Post

      I have a grading database, which is comprised of a number of tables that are linked via relationships.  I have a table and layout called student summary that has a number of tabs on it.  One of the tabs is labeled "final project."  In this tab, I have four portals that have been filtered by the stage of the project.  The final project table is set up with a minimum amount of fields; category, points, stage, full name, class code, and so on.

      I would like to sumarize the grades by stage, but cannot find a way to calculate just the points for stage one.  Because the originating table has only one field for points, the calculations for the portals is summing all of the fields labeled final project::Points.  I have also created a summary part in another layout associated witht he final project table.  This gets me closer, but still does not allow me to show grades by project stage in the student sumary sheet.  I was hoping there was a way to use an "if" or "getsummary" statement to accomplish this, but it does not appear to work.

      At this point I think the only thing I can do is set up four individual fields in the final project table, one for each stage of the project.  This will give me the specificity I need in the portals, and subsequently in the studentt summary layout.  Any thoughts?

        • 1. Re: Summing Filtered Portals
          philmodjunk

          To get a summary value from a filtered portal, do this:

          Define a field of type summary in the portal's table. Specify the options you need for your aggregate value (total, average, etc.)

          Make a copy of your filtered portal but change the specs so that it displays only one row of data. Put the summary field from your portal table inside this portal row and place portal and field where you want it on your portal. The key is that both your original portal and this one row portal must use the same portal filter expression.

          The other option for getting subtotals for different groups of related records is to set up a summary report based on the portal's table with fields from the parent table added as needed to this same layout. Sub summary parts and summary fields--with the correct finds and sorts can then group and sub total your data as needed.

          Here's a tutorial on summary reports if you are interested: Creating Filemaker Pro summary reports--Tutorial

          (This is an old thread that will no longer appear in the recent items list if you post a comment to it. If you have any questions about it, feel free to post them here instead.)