Average a column on query

O

oakridge

I have a repeating table that lists times for an operator to tune a
particular machine. I have a query that returns the tuning times for certain
machines based on certain dates.

I also want to have an average of those times. How can this be accomplished?

I have used the Avg function in the footer of the repeating table and also
outside of the table. However, it will only return an average for all like
machines in the table not a subset based on date parameters. If the query is
only showing the correct machines based on the date parameters, why does the
control for the average not adjust itself to do so. I do have that control
to refresh when the formuala is recalculated. However, I see no way to
retrigger the recalculation.

Infopath 2003, SP1, creating a form from a SQL database.
 
O

oakridge

Greg,

You are correct. If I return all data for a machine based on the dates that
appear on open of the form 1/1/2004 and 12/31/2020, the average calculates
correctly (this by the way is all of the data in the database. If I query on
any other subset, this could be dates, machine type, machine item number, or
machine tuner or combination thereof the average does not work correctly. How
can I accommodate for these in the formula for the Average?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top