> ## Documentation Index
> Fetch the complete documentation index at: https://learn.kubit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Group By and binning

> Split Kubit report results by one or more dimensions with Group By, and bucket numeric, categorical or date values into ranges with binning.

Group By (also called breakdown) and binning are shared by Query, Funnel, Path, Retention, Data Table and Significance reports. Group By splits results by one or more dimensions. Binning buckets a Group By field's values into ranges or groups. This page covers adding Group By fields, the limits per report type, sorting, the **Overall** toggle, Funnel cluster mode and each kind of binning.

## When to use

| Use case | Example |
| - | - |
| Compare segments | Event count by country or by model name |
| Nested segmentation | Sessions by platform, then by app version |
| Show a distribution | Response times in 5 equal-width buckets in a Histogram |
| Simplify a high-cardinality field | Group many plan names into "Free", "Paid" and "Others" |

## Group By

Group By splits a report's results by one or more dimensions. Instead of one aggregate number, you see a value per category, for example event count by country or by model name.

### Add Group By fields

Select a dimension field, such as country, device type, span name or model name, to split the results. Add more Group By levels for nested segmentation, up to the limit for the report type.

### Group By limits by report type

| Report type | Max Group By fields | Notes |
| - | - | - |
| Query (most chart types) | **2** | Two-level nested breakdown |
| Query (Histogram) | **1** | Histogram needs exactly one Group By, with binning |
| Query (Heatmap) | **Exactly 2** | The first group is the X axis, the second is the Y axis |
| Funnel | **2** | Plus up to **5** cohort segments |
| Path | **2** | Standard breakdown |
| Retention | **2** | Shows at most **8** rows |
| Data Table | **5** | More levels than any other report type |
| Significance | Not applicable | Uses Comparison Criteria (Breakdown, Segment or Experiment) instead |

### Sort order

Results in each group are sorted in descending order by default, highest values first. Use the sort button in the **Group By** section to switch to ascending order.

### Overall toggle

The **Overall** toggle adds a row or line with the measure computed without any grouping.

| Setting | What Overall shows |
| - | - |
| Off (default) | The sum of the visible groups. If only the top groups are shown, Overall is the sum of those groups only. |
| On | The real total computed without the Group By. It includes every dimension value, however many are shown. |

Kubit turns **Overall** on automatically when a formula contains division (`/`) or when a measure function needs it.

### Cluster mode (Funnel only)

Cluster mode sets how a Funnel groups its bars when a breakdown is active.

| Cluster mode | How bars are grouped | Best for |
| - | - | - |
| **Funnel** | By breakdown value: all steps for one segment, then the next segment | Comparing the whole funnel across segments |
| **Step** | By funnel step: all segments for one step, then the next step | Comparing segments at each step |

Funnel clustering:

```text theme={null}
[Step1-Mobile, Step2-Mobile, Step3-Mobile] [Step1-Desktop, Step2-Desktop, Step3-Desktop]
```

Step clustering:

```text theme={null}
[Step1-Mobile, Step1-Desktop] [Step2-Mobile, Step2-Desktop] [Step3-Mobile, Step3-Desktop]
```

**Availability:** Cluster mode is available only when a breakdown is active and the funnel is in Conversion mode.

### MCP prompt examples

> "Show tool call count for the last 7 days by model name"

> "Show the checkout funnel by platform, clustered by step"

## Binning

Binning buckets the values of a Group By field into ranges or groups instead of showing every distinct value. It helps most with numeric and high-cardinality fields.

### Range binning (numeric fields)

Range binning divides a numeric field into equal-width or custom ranges.

#### Auto range

Set the boundaries, and Kubit creates equal-width bins.

| Parameter | What it sets | Constraint |
| - | - | - |
| **Min Value** | The lower bound of the first bin | **0** or more |
| **Max Value** | The upper bound of the last bin | Greater than **Min Value** |
| **Number of Bins** | How many equal-width bins to create | **1** to **50** |

For example, **Min Value** 0, **Max Value** 100 and **Number of Bins** 5 create the ranges 0 to 20, 20 to 40, 40 to 60, 60 to 80 and 80 to 100.

#### Manual range

Set each bin's boundaries yourself.

| Constraint | Value |
| - | - |
| Max bins | **50**, each with a min and max value |
| Overlap | Bins can't overlap |
| Labels | Each bin can have a custom label, such as "Low", "Medium" or "High" |

### Enum binning (categorical fields)

Enum binning groups categorical values into named buckets. Create buckets, assign one or more field values to each and give each bucket a label.

The **Group Others** toggle sets what happens to values you didn't assign. When it's on, they're combined into one `Others` group. When it's off, each one shows on its own.

### Date binning (date and time fields)

Date binning buckets date values into time-based ranges, such as custom periods.

### Named binning (saved templates)

Named binning reuses a binning setup you saved earlier. Select it to apply the same bins in another report.

### When binning is required

**Histogram** charts always need binning, so you have to set how the values are bucketed. For every other chart type, binning is optional. It's available for any Group By field whose metadata marks it as one that supports bucketing.

### MCP prompt examples

> "Show a histogram of response time in 10 bins from 0 to 5000 ms"

## Related

* [Filters](https://learn.kubit.ai/product-analytics/reports/common/filters.md): limit which events a report includes.
* [Chart types](https://learn.kubit.ai/product-analytics/reports/query/chart-types.md): Histogram and Heatmap, which have their own Group By rules.
* [Cohorts](https://learn.kubit.ai/product-analytics/reports/cohorts.md): the cohort segments a Funnel can add.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.