grouping records in a crosstab query

O

oli

Please help! very confused : I am trying to group records
in a crosstab query :

row heading company name,
column heading - product
value - cost

but where a company has more than one product it shows
several lines per company

Is it possible to have only one line per company without
losing the values by product?
 
M

Michel Walsh

Hi,


You probably have Product repeated in the GROUP BY clause:


TRANSFORM SUM(cost)
SELECT CompanyName
FROM tableName
GROUP BY CompanyName, Product
PIVOT Product


Remove Product from the GROUP BY clause.




Hoping it may help,
Vanderghast, Access MVP
 

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