Pivot table - group and sum specified columns from a single "columns" field

hairyfingers

New Member
Joined
Sep 10, 2015
Messages
18
Hi

If I have this table:

NameType
amount
fooRed
2​
barRed
4​
fizBlue
3​
buzBlue
5​
fooOrange
1​
barOrange
3​
fizGreen
5​
buzGreen
3​


I can produce this pivot table

Sum of amountColumn Labels
Row Labels
Blue
Green
Orange
Red
Grand Total
bar
3​
4​
7​
buz
5​
3​
8​
fiz
3​
5​
8​
foo
1​
2​
3​
Grand Total
8​
8​
4​
6​
26​


But what I want to do is produce a pivot table that looks like this:

sum of blue & green​
sum of orange & red​
Total​
bar
0​
7​
7​
buz
8​
0​
8​
fiz
8​
0​
8​
foo
0​
3​
3​
Grand Total
16​
10​
26​

So I need some sort of calculated field that calculates from a single column of the source data

Is this possible??

my actual data set as 392000 rows and 43 columns and I'm using Excel 2013
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi,

This you can do with a simple grouping. Simply select "Green and Blue" columns, then via the mouse right click use "Group". Then rename this in the pivot. Repeat for the original Orange and Red labels. Finally remove "Type" from the pivot and leave "Type2", which is the grouping you made.
1586015144387.png

1586015281849.png
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

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