1 Reply Latest reply on Jun 2, 2014 3:56 PM by philmodjunk

    Calculate results of two summary fields

    DanPhillips

      Title

      Calculate results of two summary fields

      Post


           Hi,

           I have a report with two summary fields in sub-summary parts on the layout. The first field is for the total sale amount of the products in the found set (solar system), and the second is the total size of all systems in kilowatts in the found set.

            

           I want to divide the result of the summary fields to get an average price per wattage. I need to know how to grab the result of the summary fields because I tried just making a calculation field to divide the fields but it doesn't give me the results I was expecting.

            

           Any help is much appreciated!

           Dan.

        • 1. Re: Calculate results of two summary fields
          philmodjunk

               I have a report with two summary fields in sub-summary parts on the layout. The first field is for the total sale amount of the products in the found set (solar system), and the second is the total size of all systems in kilowatts in the found set.

               Not quite (I'm admittedly being picky here, but this is the key detail causing your issue): What you see in the two summary fields are values computed from the group of records that were grouped for that sub summary layout part.

               As you have discovered, when you refer to the value of a summary field in a calculation, it returns the found set's grand total type value--the same value that you would see if you placed these summary fields in the header, footer or a grand summary layout part.

               To access a sub total in a calculation, use the GetSummary ( Summary Field ; Break Field ) function. The "break field" that you select for this calculation is the same field that you selected as the "Sorted by" field for the corresponding sub summary part. But the break field must be defined in the same table as the summary field.