Pivot question

F

FaensenD

I have to create a pivot table as follows

The raw data are structured like that

Id Col1 Col2 Col3
1 A D F
2 A D F
3 A E G
4 B D G
5 B E F
....

What I want to have is a pivot table with Col1 as rows and Col2 and
Col3 as columns. The cells should contain the number of records
(Count(Id)).

So it shoul look like

Col1 | Col2 | Col3 |
| D | E | Total | F | G | Total |
-----------------------------------------------
A 2 1 3 2 1 3
B 1 1 2 1 1 2
-----------------------------------------------
Total 3 2 5 3 2 5


Unfortunately, when I add both Col2 and Col3 as pivot column variables
the result is as such:



Col1 | Col2 | Col3 |
| D | D Total | E | E Total | Grand Total |
| F | G | | F | G |
------------------------------------------------------------------
A 2 0 2 0 1 1 3
B 0 1 1 1 0 1 2
-------------------------------------------------------------------
Total 2 1 3 1 1 2 5


Is it possible to create a Pivot table in the way I described? If yes,
how do I do it?

Any help is well appreciated

Daniel
 
G

Guest

Nope... to do something like that your source data would need to look more
like...

Id Col1 Col2 Col3
1 A Col2 D
2 A Col2 D
3 A Col2 E
4 B Col2 D
5 B Col2 E
6 A Col3 F
7 A Col3 F
8 A Col3 G
9 B Col3 G
10 B Col3 F
 

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