grouping records in a crosstab query

  • Thread starter Thread starter oli
  • Start date Start date
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?
 
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
 
Back
Top