Results 1 to 2 of 2
  1. #1
    prv is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    3

    Calculating average in table

    I am in the process of developing a data table and am experimenting to see if calculated fields work correctly before actually entering real data. A form


    is used to enter data and place it into the table. The form correctly places data into the table. I have a problem with one of the calculated fields in the table. There are six other numeric fields (columns) which I need to average. The data represents multiple physiological measurements on the same person. Each field (column) is important and the average of the values is central to the data. I need to calculate the average of the six fields and permanently store the average as a field in the table since the values will be used in a report and it will also be exported to a statistical program. Occasionally, one of the six measurements is not possible, in which case the field is left blank. Since it is standard protocol to take six measurements, there will never be more than 6. There may be less than six if one measurement is not possible, in which case the field is left blank. Thus the need to average when one or more fields are blank. How do I calculate the average of the six fields when one or more of them may be empty? I have tried Nz function, ifnull function, ifempty functions and iif(isempty) but I cant get the calculated field to return the correct average. Apparently some of these functions cannot be used in a calculated field in a table. For simplicity sake, lets call the six measurements M1, M2...M6.

    I would greatly appreciate any help on this one.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are having trouble because calculations belong in queries and not tables. You have given no justification yet for having a calculated field in a table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculating from a Table
    By Swarland in forum Programming
    Replies: 3
    Last Post: 11-25-2010, 11:25 AM
  2. Average help please
    By C90RanMan in forum Programming
    Replies: 1
    Last Post: 08-01-2010, 12:14 PM
  3. Replies: 13
    Last Post: 05-28-2010, 11:57 AM
  4. Replies: 1
    Last Post: 05-25-2010, 02:58 PM
  5. 7 day average and total
    By jannie in forum Access
    Replies: 1
    Last Post: 05-14-2009, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums