Crosstab qry not adding up

D

deb

I've built a crosstab qry for a tenant sales database based on a select qry,
the original select query works (adds up correctly) ive checked by sorting
and adding totals to columns, but the crosstab is tripling the amounts in
each total field both for each month and the totals - i'm thinking its
something to do with the fact there are three different income types (rent,
cleaning, other) because the rows where the tenant has only one income type
are correct

this is the code

TRANSFORM Sum(SalesToTenant.[Amount]) AS SumOfAmount
SELECT SalesToTenant.[Company], SalesToTenant.[IncomeType],
Sum(SalesToTenant.[Amount]) AS [Total Of Amount]
FROM SalesToTenant
GROUP BY SalesToTenant.[Company], SalesToTenant.[IncomeType]
PIVOT Format([Date],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
 
K

KARL DEWEY

You did not post the the original select query SQL. That might be the
problem when it feeds the crosstab.
 

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