Calculated field, sum/avg results of qry?

R

Rwh5757

I need to calculate a field in query which uses two values in two fields
(field1, field2) to run a query, then sum and average all the values in two
other fields (field3, field4) in the resulting query, then display that
average in the calculated field. How can I do that?

I would appreciate any help you can give.

Thanks,
Richard
 
D

Duane Hookom

Use a totals query with a calculated column that uses two values in two
fields and then sum and average all the values in the other fields. If you
need more help, consider providing some actual table and field names, sample
records, and desired results.
 
R

Raas

Sorry, but I too, cannot get a calculated field to work in Access 2007, in
either queries or in reports. I think maybe a bad bug? If anyone can get it
to work, let us know what you did.
 
D

David F Cox

This works in Access 2007 Beta, with quite a few sample calculations:-

SELECT Sum(Table1.qty) AS SumOfqty, Sum(Table1.salary) AS SumOfsalary,
Avg([qty]+[salary]) AS xx, Sum([salary]/[qty]) AS yy, Avg([salary]*[qty]) AS
zz
FROM Table1;

Perhaps you could show us your SQL that "doesn't work", and explain how it
"doesn't work".
 

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