I'm stupid - Pivot source data with multiple columns, want columns in rows

YoBub

New Member
Joined
Nov 10, 2018
Messages
2
Excel 2016. I have source data for a pivot table across multiple columns. The first column is a date, the subsequent columns are teams, and the values are a count of faxes a team processed, for each day.

I'm trying to create a pivot table in which the dates appear across the top, summarized by month (I've got this) and the total for faxes handled by each team each month runs in rows down the left side.

I've worked with pivot tables extensively and I know I'm just being stupid, but I can't figure out how to make this work. Sleep deprivation. This is killing me.

The source data is 2 years daily across 14 teams, but here is a summary example.

[TABLE="width: 256"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD="colspan: 2"]What I have[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Team A[/TD]
[TD]Team B[/TD]
[TD]Team C[/TD]
[/TR]
[TR]
[TD="align: right"]1/2/2017[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]1/3/2017[/TD]
[TD="align: right"]32[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]1/4/2017[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2017[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD="align: right"]2/2/2017[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD="align: right"]2/3/2017[/TD]
[TD="align: right"]48[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="align: right"]2/4/2017[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]What I want[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]Jan-17[/TD]
[TD="align: right"]Feb-17[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Team A[/TD]
[TD="align: right"]67[/TD]
[TD="align: right"]122[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Team B[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]49[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Team C[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]62[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Each time I try to lay this out, I either get nested subtotals across the top, or I get values in the left column, instead of team names.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You will need to unpivot your data table as shown below. This can be accomplished using Power Query (Get and Transform) in 2016. Once you have the data in this form, then you can build a Pivot Table.

Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[TD]
H
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]
Date​
[/TD]
[TD]
Team​
[/TD]
[TD]
Value​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
1/2/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
11​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
Sum of Value​
[/TD]
[TD]
Column Labels​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
1/2/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
3​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
Row Labels​
[/TD]
[TD]
Jan​
[/TD]
[TD]
Feb​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
1/2/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
8​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
Team A​
[/TD]
[TD]
67​
[/TD]
[TD]
122​
[/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
1/3/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
32​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
Team B​
[/TD]
[TD]
34​
[/TD]
[TD]
49​
[/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
1/3/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
10​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
Team C​
[/TD]
[TD]
60​
[/TD]
[TD]
62​
[/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]
1/3/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
26​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]
1/4/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
24​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
9
[/TD]
[TD]
1/4/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
21​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10
[/TD]
[TD]
1/4/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
26​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11
[/TD]
[TD]
2/1/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
35​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
12
[/TD]
[TD]
2/1/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
10​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
13
[/TD]
[TD]
2/1/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
19​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
14
[/TD]
[TD]
2/2/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
35​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
15
[/TD]
[TD]
2/2/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
20​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
16
[/TD]
[TD]
2/2/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
22​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
17
[/TD]
[TD]
2/3/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
48​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
18
[/TD]
[TD]
2/3/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
17​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
19
[/TD]
[TD]
2/3/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
20​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
20
[/TD]
[TD]
2/4/17​
[/TD]
[TD]
Team A​
[/TD]
[TD]
4​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
21
[/TD]
[TD]
2/4/17​
[/TD]
[TD]
Team B​
[/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
22
[/TD]
[TD]
2/4/17​
[/TD]
[TD]
Team C​
[/TD]
[TD]
1​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
23
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Open you existing file and click on Data, Get and Transform, From Table. Click on the right three columns. Right click and select Unpivot. Go to the Home Tab in PQ and click on Load and Close. Now you will have your normalized table in a form in which you can build your pivot table. If you are running 2010 or 2013, you can download Power Query for free from Microsoft. It is the way of the future.
 
Last edited:
Upvote 0
Yup, that 100% worked!!! I've never used any of that functionality, so I guess that's the difference between an intermediate user and and expert.

Thanks so much for your help!
 
Upvote 0

Forum statistics

Threads
1,224,735
Messages
6,180,635
Members
452,991
Latest member
JM_000888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top