Add count to pivot

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi

I have a field on my pivot table called TYPE

This is in the row label, so it splits my data between SINGLE and GROUP

The next row label is NO (effectively the reference)

How can I produce a unique count of references?

GROUP
....4
....6
....9

SINGLE
...1
...2
...3
...5
...7
...8

Need a total COUNT for GROUP to = 3 (there are 3 unique NO)

Need a total COUNT for SINGLE to = 6 (there are 6 unique NO)

Any use of count that I introduce just shows the count of NO in the source data (so for GROUP it is multiple, for single it is 1)

Any help appreciated

Can use calcualted column etc...
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Here is a pic, need a count of the NO by TYPE

OPEN, GROUP would =3
OPEN, SINGLE would =4 (already there)
SETTLED, GROUP would =0
SETTLED, SINGLE would =2 (alreaady there)

It is the GROUP that I am struggling as the built in COUNT is just the count of occurences of that ref in raw data, not the unique count

pivot.JPG
 
Upvote 0
You'll need to add a formula to the source data to do this. You can't do it in the pivot table itself.
 
Upvote 0
What would be the best way to do this?

1/COUNTIF ?

The most important thing for me is calculation speed. I am using an i7 and SSD, but some poor folks in the office are still using pentium 4's
 
Last edited:
Upvote 0
Yes, 1/COUNTIF but you'll need to make a key column concatenating your 3 rowfields so you get a unique count for that specific combination.
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

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