Distinct count based on 2 columns in a Pivot Table

leefletcher

New Member
Joined
Mar 22, 2018
Messages
29
Office Version
  1. 2019
Platform
  1. Windows
How do I get the distinct count based on 2 columns using a Pivot Table? I did it 2 years ago and can't find my formulas or previous work.

Survey response data:
AreaResponderDistrictSchoolTypeElemMid
NortheastAndyGreen School DistrictWashington Elementary SchoolElem10
NortheastBethGreen School DistrictLincoln Middle SchoolMid01
NortheastCarolGreen School DistrictWashington Elementary SchoolElem10
NortheastCarolGreen School DistrictJefferson Elementary SchoolElem10
NortheastDavidGreen School DistrictJefferson Elementary SchoolElem10
NortheastEricYellow School DistrictBartlet Elementary SchoolElem10
NortheastEricYellow School DistrictMeyer Middle SchoolMid01
NortheastFrankYellow School DistrictBartlet Elementary SchoolElem10
SoutheastGeorgeMauve School DistrictJobs Junior HighMid01

I'm using a pivot table so I can summarize the data into a table that is eventually used in a mailmerge. My struggle is with getting the distinct count and percentages of school types in the districts.

Desired results:
AreaDistrictNumber of responses
(Count of Responders)
Number of Schools
(Distinct Count of Schools)
Number of Elementary SchoolsPercentage of Schools that are Elementary SchoolsNumber of Middle SchoolsPercentage of Schools that are Elementary Schools
NortheastGreen School District54375%125%
NortheastYellow School District32150%150%
SoutheastMauve School District1100%1100%

AreaTotal Number of DistrictsTotal responsesTotal schoolsTotal elementary schoolsPercentage of elementary schoolsTotal middle schoolsPercentage of middle schools
Northeast286466%233%
Southeast11100%1100%
State Total397457%343%

I've been working on this for 2 days. Any help is greatly appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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