Article ID: 124647 - Last Review: November 15, 2004 - Revision: 4.0

Works: How to Calculate a Running Total/Average in a Database

This article was previously published under Q124647
Expand all | Collapse all

SUMMARY

A running total or average displays the sum or average of all the values in a specific field up to any given record. In Microsoft Works, you can keep a running total and a running average by using self-referencing formulas. The table below resembles a database that contains running totals and averages, in which blank values are not counted in the average.

   Values  Number   Total  Average
   -------------------------------

     20      1        20     20
     40      2        60     30
             2        60     30
     60      3       120     40
     80      4       200     50
    100      5       300     60
				


To create a sample database similar to the one in this article, use the steps in the following procedure.

MORE INFORMATION

To create a table resembling the above example, do the following:

  1. In a new database, create 4 fields: Values, Number, Total, and Average.
  2. Switch to List view.
  3. In Record 1, type the following data (press ENTER after each entry):

    1. In the Values field, type 20.
    2. In the Number field, type 1.
    3. In the Total field, type the number located in Values.
    4. In the Average field, enter the following formula:
      =Total/Number
  4. In Record 2, enter the following data:

    1. In the Values field type, 40.
    2. In the Number field, enter the following formula:
      =Number+IF(Values,1,0)
    3. In the Total field, enter the following formula:
      =Total+Values
  5. Continue entering numbers above in the Values field.

    At this point, every value entered in the Values field will automatically place the correct values in the following 3 fields.
A running total will be calculated in the Total field while a running average will be calculated in the Average field.

APPLIES TO
  • Microsoft Works 4.0 Standard Edition
  • Microsoft Works 4.5 Standard Edition
  • Microsoft Works 4.5a
  • Microsoft Works 2.0a
  • Microsoft Works 3.0 Standard Edition
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
Keywords: 
kbfaq kbhowto KB124647
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations

 

Related Support Centers