Group small values and then count distinct?

Hi, I have some charts that take advantage of the nifty “group small values” feature and the y-axis is a “count distinct” of a user_id field. This unfortunately doesn’t quite do what I want, as the same user can be re-counted again and again if they are present in multiple small groups. I only want to count the user once if they are present in multiple small groups/aggregated groups.

Is there a way to do this with holistics (outside of re-writing the SQL transformation logic)?

Alternatively, can I just filter out the small groups (again, outside of re-writing the SQL transformation logic)?

Hi Chetan,

I hope my understanding is correct: a user can be in multiple groups, and when using “group small values”, the user is counted twice because it’s presented in 2 small groups. I’m afraid I don’t think it’s possible to make it appear only once in Holistics. I think the only solution here is to rewrite the SQL transformation logic to make sure each user only appears in one group.

About filtering out the small groups, since you mentioned the feature “group small values into “others””, my current guess is that you’re referring to the groups in dimensions that you drag into ‘legend’ (screenshot below).

To remove all the small groups, you may try using our top N feature. For example, to show only top 5 countries that the users come from, you can set a condition “where field “countries” is filtered top 5 ranked by counting user_id.

Thank you – appreciate the help! I ended up using the topN feature in this case, it’s good enough for now and means the dataset doesn’t need to be custom for this specific dashboard.

1 Like