Using Dynamic Grouping for Dimension Field Values


Dynamic grouping allows you to create groups of elements based on the field data type that you select. For example, you may have a field with US state names, but no field for US regions. Using the dynamic grouping functionality, you can create groups for different regions for use in a content item without editing the data source. You create one group that combines state name values like Maine, New Hampshire, and Massachusetts into a New England group, states such as New York, New Jersey, and Pennsylvania into a Mid-Atlantic group, and so on. You can even add the extraneous, remaining values into an Other group automatically, if you do not think they fit into another defined group.

Note: The Create Group option is only available for dimension fields of non-numeric format or attribute.

You can also specify multiple, unique groupings in the same session. For example, you might want to group the data to indicate groups or products, or specific regions.

Note: If you want to exclude a specific data element from your analysis, you can use the filter functionality.

The grouping that you specify is applied and this new group then replaces the original field that you selected in the Query pane. The name that you specify when creating the group is reflected in the Query pane.

The process of dynamic grouping creates a Define field, which can then be used in other reports or charts in the same visualization. When creating a single content item, dynamic grouping also supports Auto Drill, enabling you to drill through the hierarchy of your data just like any other data field.

Note: When working with Reporting Objects, Dynamic Grouping is not supported.

Procedure: How to Create a Dynamic Group

  1. Open WebFOCUS Designer. On the WebFOCUS start page, click the plus menu and then click Create Visualizations, or, on the WebFOCUS Home Page, click Visualize Data.

    WebFOCUS Designer opens in a new browser tab.

  2. Select a workspace and a data source available from that workspace.

    Once you select a data source, WebFOCUS Designer loads with options to create a single content item.

  3. On the Resources pane, with Fields selected on the sidebar, right-click the data field for which you want to apply dynamic grouping.

    Note: You can use the dynamic grouping functionality on non-numeric dimension fields only.

  4. Click Group values.

    The Create Groups dialog box displays.

  5. In the Field text box, optionally type a name for the new group field.

    Note: The fully qualified field name is displayed as the Origin Field at the bottom of the Create Groups dialog box. The display of the fully qualified field name is particularly useful when renaming or editing a group, as it identifies the data source followed by the hierarchical location of the field within a data set. For example, WF_RETAIL_LITE.WF_RETAIL_PRODUCT.BRAND.

  6. Create a group of values in one of the following ways:
    • Use Ctrl + click to select more than one value, as shown in the following image, then click Group.Grouping with 6 values selected using Ctrl + click
    • Drag one value onto another value. The two values are grouped.
  7. Optionally, double-click the group title or select a group and click Rename, and then type a new name for the group.
  8. Optionally, add more values to the group that you just created using one of the following methods:
    • Select one or more values, open the Add to menu, and select a group to add the values to.
    • Select one or more values and drag them into a group.
    • Drag the group onto a single, ungrouped value. The value is added to the group.
    • If you have multiple groups, drag one group into another group to merge them. The name of the target group is retained for the merged group.

    These methods can also be used to move a value from one group to another group.
  9. Optionally, create additional groups using the methods in step 7, as shown in the following image.

    Create groups dialog box showing multiple groups

  10. Optionally, to ungroup values, click a group and then click Ungroup. Click Ungroup all to disband all groups.
  11. Optionally, click Show other to add all remaining non-grouped values to an Other group.
    Note: If you add all values to the Other group, all groups, including the Other group, are disbanded. You must have at least one group for the Other group to be available.
  12. Click OK.

    Your grouped data will display as a new field in the Resources panel. If it is not immediately visible, you can use the search feature on the field list to find it. From there, you can add the grouped field to your content, as shown in the following image.

    Chart containing groups
    To edit the grouped field, right-click it in the Resources panel and click Edit group values.