Triple Posted January 28, 2009 Posted January 28, 2009 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
RalphL Posted January 28, 2009 Posted January 28, 2009 Welcome to the Forum. Look at the Average function. It will not include empty fields in the calculation.
Triple Posted January 28, 2009 Author Posted January 28, 2009 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
RalphL Posted January 28, 2009 Posted January 28, 2009 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.
comment Posted January 28, 2009 Posted January 28, 2009 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.
Triple Posted January 28, 2009 Author Posted January 28, 2009 Great, changing it to a summary field looks to have done the trick. Thanks for all the help.
Recommended Posts
This topic is 5837 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now