Count Unique Values in Pivot Table with Multiple Groups

lydiapenrose

New Member
Joined
Nov 7, 2011
Messages
22
Okay. So I have a large amount of data that tracks employees with their business line, service area, activity and hours, which they have to fill in weekly. I have a pivot table which groups so it shows the number of hours per business line or per business line + service area or per business line + service area + activity. And this sum of hours is dynamic depending on what is grouped/ungrouped.

I want a similar column in my pivot table showing a unique count of employees. So it would show that 16 employees work for Finance and 10 work for HR. But then when it expands, it shows that of those employees, 3 in HR worked on payroll, 7 worked on benefits, 9 worked in training, etc. etc.

I've been looking around and most people recommend adding another column that would put 1 if the person's name is unique, but this only works if it is sorted by one category. A person might be counted multiple times in different activities, but only once in that business line when the group is collapsed if that makes sense.

Any help would be much appreciated! Thanks :)
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,589
Messages
6,125,695
Members
449,250
Latest member
azur3

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