The sample data source format is as follows. Now we need to count the number of people with uid in each group:
By default when using a pivot table, you can only select "Count" to get the number of rows for each group, and the uid is not deduplicated;
Solution:
When selecting data to generate a pivot table, check "Add this data to the data model", and then the "Distinct Count" option will appear in the "Value Field Settings". The result generated after selecting it is what we need of.