Pivot Table formating issues:

G

Gordon

I have downloaded data from SQL Server.
I want it in a pivot table sorted by last name.
When I create the pivot, it gives me columns and rows
like below. It does not repeat the last name. It groups
on the last name. I don't want it like that. I want to
get the last name repeated in every row. I can't find a
setting to change this. The data is correct in the query
from SQL server.

Adams Trey
gordon
John
Paul

I want it like

Adams Trey
Adams Gordon
Adams John
Adams Paul

Any help on this is greatly appreciated.
Gordon
 
D

Dave Peterson

Can you convert the pivottable to values? (or copy it somewhere else as values)

If yes, then you can copy the lastname down the empty cells by using techniques
at Debra Dalgleish's site:

http://www.contextures.com/xlDataEntry02.html

I don't think you can change this behavior while it's still a pivottable.
 
F

Flamikey

While I am nowhere nearly the guru Dave is, I do know 100% the answer to
this one. Unfortunately, there is no setting to copy down the primary
row sort key in the pivot table. If this is a must I suggest you use
MS Access which can do this. If you are proficient with Pivot table
you can easily pick this up in Access.
 
G

Gordon

What if I don't sort on last name. I can use the unique
Identifier. This will probably allow the values to sort
by the unique identifier.
 
F

Flamikey

What you can do is have another sheet that references the pivot tabl
and put in a formula to fill down the "Blank" cells. For instance
your pivot table might look like this:
A B
C
Row 3 Last name 1 First Name 1 Data
Row 4 "Blank" First Name 2 Data
Row 5 "Blank" First Name 3 Data
Row 6 "Blank" FirstName 4 Data
Row 7 Last name 2 First Name 1 Data
Row 8 "Blank" First Name 2 Data

Create another sheet. Name the pivot table sheet "Pivot Table". Mak
the cell in the new sheet = the cell in the pivot table except wher
there is a blank. I could get a little more complicated by using th
Indirect and Cell functions but you really don't need it. In Cell A
put in the formula =IF(ISBLANK('Pivo
Table'!A3),IF(ISBLANK(A2),0,A2),'Pivot Table'!A3). Copy this formul
across and down in the insert sheet.

This will fill in the blanks in the first column of the pivot table.
There is no way to get the pivot table itself to do this.

Hope this helps
 

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