January 28, 200917 yr Hi, I have a db that has about 10 records in it. Each record has a field for "x" but not every record has a value in said field. I can't figure out how to write a calculation that will give me an average of the values that I do have. For example say out of the 10 records 6 have a numeric value in field "x" and the other 4 have yet to be entered. How can I get the average of just those 6 records keeping in mind that the other 4 values will be added at a later date and therefore will be part of the calculation in the future? Thanks
January 28, 200917 yr Welcome to the Forum. Look at the Average function. It will not include empty fields in the calculation.
January 28, 200917 yr Author Thanks for the welcome. I had tried that but it didn't seem to work. I created a new calculation field, chose the "Average" function then entered the field that I wanted to average (called Avg. Speed) in the parenthesis. So it ended up looking like this: Average (Avg. Speed). My new field is blank when I go back to the browse screen. Is there something I'm missing? thanks
January 28, 200917 yr You need to make a relationship to the other records that are used in the average calculation. Then your cal should look something like Average (Relationship Name::Ave.Speed) Relationship Name is the name you assign the relationship.
January 28, 200917 yr If you want to average records in the found set, use a summary field, not a calculation. A summary field defined as Average of FieldX will return the average of non-empty values in FieldX. I am not sure what your value represents, but keep in mind that most often an average of an average does not produce a meaningful result.
January 28, 200917 yr Author Great, changing it to a summary field looks to have done the trick. Thanks for all the help.
Create an account or sign in to comment