Pivot Column count by value

MDCurry

Board Regular
Joined
May 3, 2005
Messages
188
Hi All
I would like to add a column to an existing pivot table (without modifying my data range) that counts the number of records based on a given value in the data range from which the pivot table is based.

Based on the data below Id like to add a column to my pivot table that counts "Decision" where the value is 5. In this case there are 5 out of 20 records where the decision is 5.

HTML:
ID	Major	Accept	Decision
1	NSG	Y	5
2	PSY		2
3	COM	Y	1
4	CJ		3
5	NSG	Y	5
6	PSY		2
7	NSG	Y	4
8	PSY	Y	4
9	COM	Y	5
10	CJ		2
11	NSG	Y	4
12	PSY		4
13	PSY	Y	5
14	NSG		4
15	PSY	Y	2
16	COM		3
17	CJ	Y	5
18	NSG		3
19	PSY	Y	1
20	NSG		2

My pivot table looks like below (3 columns). The new 4th column should display by major the 5 Decisions (CJ=1, COM=1, NSG=2 PSY=1) in my data that equal 5.

HTML:
Row Labels	Count of id	Count of ACCPT
CJ	                   3	              1
COM	                   3	              2
NSG	                   7	              4
PSY	                   7	              4
Grand Total	     20                 11

Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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