It is sometimes the case that we need to create a pie chart, or any other chart that has row limits, but our raw data exceeds those limits.
We can always make Lookml or SQL Database changes to create buckets, such as seen here:
https://community.looker.com/lookml-5/create-an-other-bucket-in-a-chart-1100
but that doesn’t always match our work flow.
My solution is an explore-only purely table calc driven solution.
There are 3 main parts.
What this allows us to do is to set a row amount that we want to appear in the visualization, and have all rows after that be grouped dynamically into the “Others” bucket, and have their measure data be rolled dynamically into the new measure table calc.
This can help create bucketing prototypes, or help out explore users who cannot change the lookml/backend sql.
row() function is not working in sql expressions in looker view.