cPlan Named Group Examples
You can define named groups to use when accessing cBase data.

In the cPlan, define the group using an expression. For example, here the structure of the dimension value is used:
cplan {
input "/common/basic.cbase"
dimension "Mood" {
group "Ends with y" `rsubstr(value("Mood"), 1, 1) = "y"`
}
}
The group can be included in a dive as follows:
dive {
cplan "named-group-expression.cplan"
window {
dimension "Mood"
column "Value"
group "Mood" "Ends with y"
}
}
The results show the named group under the dimension with a value that matches the expression as defined in the cPlan. For example:

In the cPlan, list the values for the group. For example, create a named-group-values.cplan:
cplan { input "/common/basic.cbase" dimension "Direction" { group "Northeast" "North" "East" } }
Use the group in a dive. For example:
dive { cplan "named-group-values.cplan" window { dimension "Direction" column "Value" group "Direction" "Northeast" } }
The results show the named group for the dimension with a value summed from the values for the group members: