> ## 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.

# group_label

> Group related dimensions together under a label in the workbook field browser for cleaner organization and easier discovery.

## Limitations

**[Dimensions](/modeling/dimensions) and [measures](/modeling/measures) can't be grouped together.** Applying the same group label to a dimension and a measure will result in two groups displaying in the field browser, not one group with both fields.

## Syntax

```yaml theme={null}
<dimension_name>:
  group_label: <label_text>
```

## 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
</ParamField>

<ParamField path="group_label" type="string">
  Unquoted text specifying the group under which the field should appear in the field browser. Use the greater-than symbol (`>`) with whitespace on either side to create nested group hierarchies. Refer to the [Organize fields with nested groups guide](/guides/modeling/nested-field-groups) for more information and examples.
</ParamField>

## Date dimensions

When you apply a `group_label` to a date dimension, all timeframe variations (day, week, month, year, etc.) automatically nest under the parent field name within that group. For example:

```yaml title="Parent date field with a group label" theme={null}
created_at:
  group_label: Important Dates
```

In the field browser, this renders as:

```
▾ Important Dates
  ▾ Created At
      Created At Date
      Created At Week
      Created At Month
      Created At Year
      ...
```

This keeps related timeframes organized together while allowing you to categorize date fields into logical groups.

If you want to have specific timeframes as standalone dimensions (not under a group), specify `timeframes: []`.

## Examples

```yaml title="Grouping fields" theme={null}
name:
  group_label: Important Fields
```

```yaml title="Nesting under a timeframe group" theme={null}
created_at: {}

example_new_time:
  sql: "other_time"
  group_label: Created At
  timeframes: [minute]
```

```yaml title="Standalone date dimensions" theme={null}
created_at_date:
  sql: ${created_at[date]}
  label: Created at Date
  timeframes: []

created_at_month:
  sql: ${created_at[month]}
  label: Created at Month
  timeframes: []
```

In this example, note that the `group_label` is `"Created At"` not `"created_at"`, as the group label must match the label, not the field:

```yaml title="Custom timeframe in existing group" theme={null}
created_at_minute_5:
  sql: id+1
  group_label: Created At
```

### Nested groups

**Grouping types of customer data**

<Tabs>
  <Tab title="YAML">
    ```yaml theme={null}
    views:
      customers:
        dimensions:
          first_name:
            group_label: Contact Info > Name
          last_name:
            group_label: Contact Info > Name
          email:
            group_label: Contact Info
          phone:
            group_label: Contact Info
          street:
            group_label: Location > Address
          city:
            group_label: Location > Address
          state:
            group_label: Location > Address
          country:
            group_label: Location
    ```
  </Tab>

  <Tab title="Field browser result">
    ```markdown theme={null}
    ▾ Contact Info
      ▾ Name
          first_name
          last_name
        email
        phone
    ▾ Location
      ▾ Address
          street
          city
          state
        country
    ```
  </Tab>
</Tabs>

**Grouping date fields by category**

<Tabs>
  <Tab title="YAML">
    ```yaml theme={null}
    views:
      orders:
        dimensions:
          created_at:
            group_label: Key Dates
          shipped_at:
            group_label: Key Dates
          internal_timestamp:
            group_label: System > Timestamps
    ```
  </Tab>

  <Tab title="Field browser result">
    ```markdown theme={null}
    ▾ Key Dates
      ▾ Created At
          Created At Date
          Created At Week
          ...
      ▾ Shipped At
          Shipped At Date
          Shipped At Week
          ...
    ▾ System
      ▾ Timestamps
        ▾ Internal Timestamp
            Internal Timestamp Date
            ...
    ```
  </Tab>
</Tabs>
