In Excel Pivot tables there is no direct “count distinct” option. Let’s see how we can get it. Assume that our data is the following:
and we want to get the count distinct values by group. How we have to do is:
- Step 1: Select your data
- Step 2: Insert–>PivotTable
- Step 3: Tick the “Add this data to the DataModel”
Now, you are able to select the “CountDistinct”
And we get the count of the distinct values as we can see below!: