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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/modeling/dimensions/parameters/groups",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# groups

> Buckets results with CASE-like logic by filtering field values into labeled groups.

This parameter generates `CASE WHEN...` SQL statements in the background.

## Limitations

This parameter is only compatible with string fields. Use [`bin_boundaries`](/modeling/dimensions/parameters/bin-boundaries) for numeric fields.

## Syntax

```yaml theme={null}
<dimension_name>:
  sql: ${<view_name>.<field_name>}
  groups:
    - filter:
        is: [<value_1>, <value_2>, ...]
      name: <group_name>
  else: <fallback_group_name>
```

## Properties

<ParamField path="dimension_name" type="object">
  The name of the dimension. Dimension names must:

  * Be unique within the view
  * Start with a letter
  * Contain only alphanumeric characters and underscores

  <Expandable title="dimension_name properties" defaultOpen="true">
    <ParamField path="groups" type="array">
      An array of group definitions that map field values to group names.

      <Expandable title="groups properties" defaultOpen="true">
        <ParamField path="filter" type="object" required>
          A filter condition using the `is:` syntax to match values.
        </ParamField>

        <ParamField path="name" type="string" required>
          The name to assign to values matching the filter condition.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="else" type="string">
      The fallback group name for values that don't match any filter condition.
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Status grouping" theme={null}
status_groups:
  sql: ${order_items.status}
  groups:
    - filter:
        is: [Cancelled, Returned]
      name: Test
    - filter:
        is: [Processing, Shipped]
      name: going
  else: Other
  label: Status Groups
```
