2 Replies Latest reply on Oct 30, 2009 8:16 AM by philmodjunk

    Using the Sum function

    jackdash

      Title

      Using the Sum function

      Post

      I am construting a flat database and would like advice on the following:

      I have a field named Amounts for which I want to have a total at the bottom I thought I would be able to use the Sum function but get the impression that to use Sum I have to enter each field ie Sum(amount1,amount2 etc.)

      Is there a way to sum all the fields without having to enter all the amount fields?

        • 1. Re: Using the Sum function
          ninja
            

          Howdy jackdash,

           

          How many 'amounts' are there?  If there are a large number, you might want to reconsider the "flat" part and use a child table so that there are many records, each one with one "amount"

           

          Then your total could be Sum(Child::amount) and you'd be done with it.

           

          If there are only 2-3 'amounts', simply make your calculation field to be = amount1 + amount2 + amount3

          • 2. Re: Using the Sum function
            philmodjunk
               Nothing wrong with Ninja's suggestion, but you can also define a summary field to do this and place it in a footer or trailing grand summary to get a total at the bottom of your layout/report.