This page refers to the
group_label
parameter that is part of a field.
group_label
can also be used as part of an Explore, as described on thegroup_label
(for Explores) documentation page.
Usage
dimension: field_name {
group_label: "desired label name"
}
}
Hierarchygroup_label |
Possible Field TypesDimension, Dimension Group, Filter, MeasureAcceptsA string |
Definition
The group_label
parameter enables you to combine fields into custom groups, within a given view, in the field picker. Consider this example:
If you did this, instead of the fields appearing ungrouped, they would be combined into an expandable Shipping Info section:
Additionally, you can use the group_item_label
parameter to specify how fields are displayed in the field picker under a group label. See the group_item_label
documentation page for details.
group_label
also interacts with dimension groups in useful ways, since a dimension group automatically places its fields together in the field picker. By using group_label
, you can add additional fields into the dimension group. For example:
This would look like:
You must have at least one field with the group label to create a group in the field picker. In addition, you can’t group dimensions and measures together under the same group label, because all dimensions always appear above all measures within any given view.
For example, with a single field:
The group label looks like: