Total events and unique users changes when group by is used

  • 17 March 2021
  • 2 replies


Hi all,

Why did the total number of events reduce when I include a user property into group by?
Has this got to do with the pruning that is being applied?

The user property is the company ID a user is tied to.
Below is before group by with a user property for a particular event, performed by any users.
For eg. there are 421 events in Feb 21


Below is after I add the company ID into the group by, for the same event, performed by any users.
Feb 21 now has 130 events.
It is possible that a user from a company ID, performs multiple events in the same month, but we are counting events here, so that should not be the reason, why it gets reduced.


The opposite can happen if I group by a user property like ‘role’ in which the user can have multiple roles. Again for the same event, performed by any users. We can see Feb 21 total events went up to 813.


Is there a concept/principle on how amplitude groups the data, that I am missing?
Any ideas on how I can check the company ID user property to see what’s going on?


Best answer by Corey 18 March 2021, 04:17

View original

2 replies


My colleague and I found out the issue.
Basically, it did have something to do with the pruning of the results:

By default, Amplitude only selects the Top N number of categories to show in the table (below the chart) and also on the chart. Hence the counts for the chart with a group by did not match the total counts for the chart without a group by. And when there are a lot of categories in the table/chart, the results are not shown.

It is not obvious and actually very misleading when interpreting the results!

Userlevel 5
Badge +8

@Corey - That is correct. Just to add a little more context here, for most Amplitude charts you will see that the Breakdown table has a note above it saying displaying top 100 results, and also recently we have also added a message saying “Results may be pruned” to make this behavior more obvious.