Skip to main content

Organize fields with nested groups

Grouping related fields together ensures that the field browser in workbooks is tidy and easily navigable.

Limitations

Dimensions and 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.

Group creation

Group structures are created by using the greater-than symbol (>) in a dimension or measure group_label parameter, which must have whitespace on either side. Each segment will become a collapsible group level in the field browser.For example, to create the following structure in the field browser:
Field browser structure for Location group
â–¾ Location
  â–¾ Address
      street_address
      city
  â–¾ Coordinates
      latitude
      longitude
You would add the following group_label parameters to the street_address, city, latitude, and longitude dimensions:
Create a Location group with Address & Coordinates subgroups
dimensions:
  street_address:
    group_label: Location > Address

  city:
    group_label: Location > Address

  latitude:
    group_label: Location > Coordinates

  longitude:
    group_label: Location > Coordinates
This example used dimensions, but you can also create group structures for measure fields the same way. Nested groups are especially helpful for measures that answer the same question in slightly different ways, as it lets you start broad and drill into more specific definitions only when needed.
Aggregation types have been omitted in the following example to keep the focus on group creation.
Grouping measures in a support_tickets view
measures:
  first_response_breach_by_day:
    group_label: SLA breaches > First response

  first_response_breach_by_month:
    group_label: SLA breaches > First response

  breach_resolution_by_day:
    group_label: SLA breaches > Resolution

  breach_resolution_by_month:
    group_label: SLA breaches > Resolution
Which will create the following structure in the field browser:
Field browser structure for SLA breaches group
â–¾ SLA breaches
  â–¾ First response
      first_response_breach_by_day
      first_response_breach_by_month
  â–¾ Resolution
      breach_resolution_by_day
      breach_resolution_by_month

Nesting depth

Groups can be nested:
dimensions:
  detailed_address:
    group_label: Geography > Location > Address > Details

Field browser collapse and expand behavior

Field groups will behave as follows:
  • Click a group header to expand or collapse its contents
  • Nested groups only appear when their parent group is expanded
  • Fields only appear when all ancestor groups are expanded
  • When you select or filter a field, its parent groups show an indicator so you can see which groups contain active selections even when collapsed