Looker Studio has introduced a new feature called "Bins" that allows for more flexible metric bucketing with either equal or custom sizes. This feature simplifies data categorization and analysis, enhancing the creation of insightful visualizations and reports. Bins are a significant improvement over the traditional CASE WHEN
expressions.
Key Features of Bins
- Ad Hoc Numeric Tiers: The Bin calculated field type allows users to create numeric tiers for numeric dimensions without needing to develop
CASE WHEN
expressions or logic in SQL. - Granularity Adjustment: Quickly group values into specific integer ranges to adjust data granularity.
- Maximum Bins: A maximum of 195 total bins can be created for each Bin field type.
Examples of Using Bins in Looker Studio
- Sales Revenue Ranges: Group sales revenue into predefined bins such as $0-$500, $501-$1000, and $1001-$1500 to quickly analyze different revenue segments without writing complex
CASE WHEN
statements. - Age Groups: Create bins for age groups like 18-25, 26-35, 36-45, etc., to easily segment and analyze demographic data in your reports.
- Session Duration Ranges: Group session durations into bins such as 0-30 seconds, 31-60 seconds, and 61-120 seconds to analyze how long users stay on your site.
- Order Quantity Tiers: Segment order quantities into bins such as 1-10, 11-20, 21-30, allowing for rapid assessment of order distribution and identifying trends across different order sizes.
Creating Custom Bins
In Data Source
- Edit the Data Source: You must have edit rights.
- Add a Field: Click "Create new" and select "Add bin".
- Select Existing Field: Choose a field to bin by from the drop-down menu.
- Specify Name and ID: Provide a unique name and optionally edit the default ID.
- Refresh Field Info: Optionally, refresh field info to get dimension values.
- Specify Bin Type:
- Equal Sized: Bin numeric values into equal integer ranges.
- Custom Sized: Create custom bin sizes of varying integer ranges.
- Customize Bin Sizes: Enter values for bin size, minimum, and maximum values.
- Save: Click "Save" to finalize.
From a Report
- Create/Edit Report: In the Data panel, click "Create new" and select "Add bin".
- Follow Steps Similar to Data Source: Follow similar steps as creating in a data source.
Editing Custom Bins
- In Data Source: Edit the formula by clicking the fx symbol next to the field name.
- Chart-Specific Custom Bins: Field Editing in Reports must be enabled, and you must have edit rights. Chart-specific bins exist only in the chart where they are created.
Reusing Chart-Specific Custom Bins
- Chart-specific calculated fields can only be reused by copying the chart containing them. The copy will retain the calculated fields, which can then be edited as needed.
For more detailed instructions and examples, refer to the Looker Studio Help.