2 Replies Latest reply on Dec 10, 2008 4:22 AM by Glibbs

    A calculation on a summary field



      A calculation on a summary field



      I have a db which is basically a Bill of Materials.

      I total the value of the components (a summary) used in each parent product which is placed in the leading summary part (contaning the parent part number) of the report and is sorted by the parent part number.   What I need to do is perform a percentage calculation on the value of the components and place that field in the same summary part.    The result though is repeated in every summary which is the percentage calculation of the value of all the components in all the BOM's

      My brain hurts!

        • 1. Re: A calculation on a summary field



          Thank you for your post.


          In a calculation field, the GetSummary () function has two parts; the summary field, and the break field.  For the current sub-summary, you may have something like:


          GetSummary (ValueSummary; ParentProduct)


          That is, grab the value from the ValueSummary field and break it down by the ParentProduct component field.


          If you use the summary field also for the "break field"...


          GetSummary (ValueSummary; ValueSummary)


          ... you will have the total for the entire found set of records.  Therefore, the calculation:


          GetSummary (ValueSummary; ParentProduct) / GetSummary (ValueSummary; ValueSummary)


          ... returns the percentage for each sub-summary section.


          Does this help?



          FileMaker, Inc. 

          • 2. Re: A calculation on a summary field


            Apologies for late reply, trying to in and out of Thailand!

            Your suggestions worked of course and thanks.

            Although I had tried 'GetSummary' what I hadn't understood was that it had to be in the same table!   I am using four and just randomly created the calculation in the current table I was editing at the time.   Wrong!!


            Thanks again