Custom Bins in Looker Studio

Jul 8, 2024

New Feature: Custom Bins in Looker Studio

If you’ve been in Looker Studio in the past couple of weeks, you might have noticed a new feature in your data sources and charts: custom bins! Custom bins make it easier to categorize dimensions without having to use a fully customized calculated field. Namely, this is one way to avoid writing CASE expressions in Looker (yay!). 

What are custom bins? 

According to Google, custom bins “create ad hoc integer ranges for dimensions without needing to develop or code logical expressions.”

In other words, custom bins allow you to define ranges of numerical dimensions and view your data in those ranges instead of viewing every data point separately. They allow you to look at your data in bigger buckets to more easily see patterns.

How custom bins make life easier:

Custom bins are most helpful when you find that your data is too granular. There are several different reasons I would use custom bins over writing CASE statements, many of them being big time savers: 

  • Scenario A: You have way too many rows, and it would make more sense to view the data in ranges rather than exact points. 

For example, you have a list of books sorted by the year they were published, ranging from 1950 to 2024. You could quickly use a bin to sort the books into decades.

  • Scenario B: You want to create ranges that are not simply calculated. 

For example, you want to create equal bins of 3,500 in size, starting at 30,013 and ending at 40,120. You could manually find each bin’s start and end number and define it in a CASE WHEN statement, but using a custom bin would be much faster.

  • Scenario C: You need to create ranges to rank performance.

 For example, you have a list of campaigns and their conversion values over a time period. But the numbers aren’t evenly rounded and all you really care about is which range they fall into. This is a good reason to use a bin. See the screenshot below:

Campaign Conversion Value Tiers

Limitations of custom bins

While custom bins can be big time savers, they’re not without limitations. Keep in mind the following tips:

  • The maximum number of bins is 195
  • You can only use custom bins with numerical dimensions (this makes sense as you need to define an integer range)

How to create a bin

Like other calculated fields, you can create custom bins at the chart level or at the data source level. Custom bins made at the data source level can be used across charts in the entire report. Bins made at the chart level will only be available for that specific chart. 

At the data source level 

Open the list of data sources and click “Edit” on the data source you need a bin for.

Data source level

In the upper right, choose “Add a field” and then “Add bin.”

Add a calculated field in looker

This will open the bin fields. You’ll need to select which field you want the bin to categorize values for, a name for the new bin, and how you want to tier your values. 

Field ID

At the chart level

In the setup tab of the chart, click “Add dimension” and choose “Add bin” at the bottom. This will take you to the bin setup page. 

Add dimension and add bin in Looker

OpGo Marketing creates custom dashboards

Do you need help creating dashboards for yourself or a client in Looker Studio? OpGo Marketing has extensive experience in Looker Studio, including with native and third party connectors. Contact us to find out how we can help!