Jovanny
Jovanny

Reputation: 167

Count unique names (based on gender) using pivot table

I have a table which consist of 7 students and three age ranges (<=13, 14-17 and 18-20). I want to count the number of students that fall into these age ranges (based on their gender) using pivot table. I was able to use pivot table to categorize the students under the different age ranges but I'm not able to get the total number of students for each range. How do I go about it?

enter image description here

enter image description here

Upvotes: 0

Views: 264

Answers (1)

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60379

If I understand you correctly, what you need in the Values section is a "distinct count" of the student names.

*I'm not sure what you mean when you write "by gender" as you do not show your desired results

In order for this to show up when you Insert a Pivot Table, select the Option to Add to Data Model

enter image description here

Then, when you select the Value Field Settings, you'll see the distinct count option

enter image description here

Voila!

enter image description here

enter image description here

Upvotes: 1

Related Questions