crosstabs

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

I have a small database with 3 columns: Name, Company, District. I want
to get a table with the Companies as columns, Districts as rows and the
Names in the cells. I tried the "crosstabs" function but that gave me
only numbers (like Pivot tables in Excel), not names... What do I do
wrong? I thought this was quite easy to do in Access, but I don't
succeed.
Wim
Durban RSA
 
In query design view build like this --
FIELD Company Name District Name
TABLE YourTable YourTable YourTable YourTable
TOTAL Group By Group By Group By First
CROSSTAB Row Heading Column Heading Value

In the CROSSTAB row of the grid and first column of Name remove Row Heading.

The SQL will look like this --
TRANSFORM First(YorTable.name) AS FirstOfname
SELECT YourTable.company
FROM YourTable
GROUP BY YourTable.company, YourTable.name
PIVOT YourTable.district;
 
Karl, Thanks a lot. That looks already much better. However, this
creates a row for every entry/record, rather than putting entries with
the same row heading on the same row. And further, I would like to see
entries/records with the same column and row heading merged into 1
cell, and seperated by e.g. a "/" or [HRt]. How to do that?

And how to do Word Wrap in query cells?
 

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

Back
Top