Skip to main content

Compare with group by

Last updated 06/25/2026

Comparison is a common analysis method, such as comparing data across different dimensions on the same date. In analysis models, you can make such comparisons with group-by items. If you want to compare data across different dates, you can add a comparison phase in Events Analysis.

Feature details​

Group-by items let you view the data results for each group value. Event properties, user properties, user tags, and user cohorts can all be used as group-by items.

For example, if you select Source Channel as the group-by item, each specific source channel, such as app store, Huawei AppGallery, and Tencent MyApp, is a group value. Each group value has its own data result, which represents the number of purchases from that channel.

You can also add multiple group-by items to cross-compare the performance of different group values across multiple dimensions. Except for Funnel Analysis and Composition Analysis, all models support up to 50 group-by items.

Grouping methods​

If the property type of the selected group-by item is numeric, list, or time, there may be many group values. You can set a grouping method to merge different group values into one group before comparing them.

Numeric type

Grouping methodsCalculation logic
Default

Determined automatically by the number of group values

  • If there are fewer than 20 group values, the actual values are used as groups
  • If there are 20 or more group values, the range between the minimum and maximum values is divided into 12 equal intervals
DiscreteThe actual values are used as groups. If there are more than 500 group values, the range between the minimum and maximum values is divided into 12 equal intervals
CustomDivide intervals manually as needed. All intervals are left-closed and right-open

If the selected group-by item has clear interval meanings in your business, for example, levels 1~12 are the beginner stage, you can select Custom to divide the intervals. When you want to further analyze the data within a certain interval, you can select Discrete to compare the performance of different group values more easily.

Time type

Grouping methodsCalculation logic
SummaryAutomatically groups data from the same day, week, month, and so on, based on the selected summary granularity
No SummaryGroups by the actual reported time

Time-type properties are measured in seconds or milliseconds, so there are many group values. We recommend that you summarize them during analysis. For example, when you group by registration time, summarize by Daily to perform a cohort analysis. If you want to show detailed data in a flat list, you can also select No Summary.

List type

Grouping methodsCalculation logic
By valuesSplits the list into multiple elements. One event is counted toward the group of each element
By listsTreats the list as a whole. Identical lists form one group
By setsDeduplicates and sorts the elements in each list to get a set, and then puts identical sets into one group

In games, the IDs of the heroes deployed in a battle are often recorded in a list-type property. You can choose a suitable grouping method based on your analysis scenario:

  • To compare how many times different heroes are deployed, use By values
  • To compare how many times different lineups (hero combinations) are deployed, select By lists or By sets, depending on whether you need to distinguish repeated appearances of the same hero or the order of heroes
Note

If the group-by items include multiple list-type properties, only one of them at most can use the By values grouping method, unless all the other list-type properties are dimension table properties of that property.

Was this page helpful?