# Using Count in Pivot Table when Summarizing

#### Andy0311

##### Board Regular
Hello,
I've created this pivot table to summarize the number of distinct dates a teacher was online. Teachers are in the rows. Dates are columns.

In the Grand Total column I want to show the number of dates the teachers were online. For example, in the first row in the grand total equals 2 for total lessons graded on 8/24. I would like, instead, the cell to calculate the number of days, which in the case of row one, would be 1. Out of the two possible days available to work, 8/11 and 8/24, Robert worked only on the 24th. What I don't understand how to do is change the summary box so that it will count the distinct days. In the value field settings I've tried both Count and Count Numbers and both give me the same result of 2 in my example of row 1. Any help would be greatly appreciated at this point. Thank you.

#### Attachments

• 1598455205291.png
50.4 KB · Views: 0

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### sandy666

##### Well-known Member
while creating Pivot Table use add to Data Model then you'll get count distinct possibility

Last edited:

#### Andy0311

##### Board Regular
I can't click the box Add this data to the Data Model. It is greyed out. Thanks for helping me.

#### sandy666

##### Well-known Member
start from the beginning
usually it works with Excel Table or range
you've 365 / 2016 so Data Model is supported

#### Andy0311

##### Board Regular
Thank you for helping me. I figured out why the selection was greyed out. After I saved the file in 365 I could select it. Great help. Thanks. A

You are welcome
Have a nice day

Replies
0
Views
87
Replies
5
Views
217
Replies
3
Views
86
Replies
1
Views
32
Replies
6
Views
64