3 Replies Latest reply on Jul 6, 2010 11:21 AM by philmodjunk

    Sum all values in a field

    PedroAlves

      Title

      Sum all values in a field

      Post

      Hi

      I'm creating a small db in which I have several students, being the name one of the fields, and one field for each month with the amount paid. So far I've been able to create a sum of all months for each student

      Sum ( set;out;nov;dez;jan;fev;mar;abr;mai;jun;jul;ago)

      but I would like to have a sum for each month of all students, so far I haven't been able to do that.

      The purpose is to make a bar chart with the overall income of each month

      Any lights would be most appreciated

        • 1. Re: Sum all values in a field
          philmodjunk

          Use a "total of" Summary field to compute the total of a given month field. Summary fields compute values that combine the values of the specified fields for all the records in your current found set--so to get the totals for all students you'll need to find all relevant student records before you'll see the correct value in this field. With your design, you'd need one such summary field for each month of the year.

          • 2. Re: Sum all values in a field
            PedroAlves

            Thank you very much... now its a pretty basic thing to do... still learning... or forever learning...

            • 3. Re: Sum all values in a field
              philmodjunk

              You may want to consider a separate payments table set up to function as a ledger for logging each payment recieved. You could still get your monthly totals, but this enables you to work with multiple partial payments, payments for more than one month and you can more easily distinguish between payments made in January 2009 and payments made in January 2010.