Sum of field value based upon multiple instances of another value

N

NAHolmes

I have a table with the following fields:

ITEM
TOTAL
REF

The data is imported from Excel & the value in the ITEM field may be
repeated for an instance in the REF field.

So for 3 different REF values, the ITEM values may appear up to 3 times.

Is it possible to produce a query which will show the total for each ITEM,
rather than each instance?

Thanks in advance.
 
J

John W. Vinson

I have a table with the following fields:

ITEM
TOTAL
REF

The data is imported from Excel & the value in the ITEM field may be
repeated for an instance in the REF field.

So for 3 different REF values, the ITEM values may appear up to 3 times.

Is it possible to produce a query which will show the total for each ITEM,
rather than each instance?

Thanks in advance.

Certainly. Create a Query based on the table; select the ITEM and TOTAL
fields. CHange the query to a Totals query by clicking the Greek Sigma icon
(summation sign, looks like a sideways M).

Leave the default GROUP BY for Item and change it to SUM for Total.

Since each row of the result will refer to three different REF values, you
shouldn't display that field - there are tricks if you need to do so.
 
N

NAHolmes

John W. Vinson said:
Certainly. Create a Query based on the table; select the ITEM and TOTAL
fields. CHange the query to a Totals query by clicking the Greek Sigma icon
(summation sign, looks like a sideways M).

Leave the default GROUP BY for Item and change it to SUM for Total.

Since each row of the result will refer to three different REF values, you
shouldn't display that field - there are tricks if you need to do so.
--

John W. Vinson [MVP]
.
Many thanks John. I guessed it would be something simple. I do indeed need to filter by the ref field, but I already have a series of other queries & a form to do that. I have just modified to relevant query for TOTALS & it works a treat.

Thanks again.
 

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