7.2 Creating a Named Grouping

The default grouping procedure simply partitions a column based on its distinct values. For example, if a column contains state abbreviations CA, NY, and WA, then the default grouping produces one group for CA, one group for NY, and one group for WA.

If this default grouping is not satisfactory, you can create a different partition with Named Grouping. A Named (User-Defined) Grouping is a reusable set of custom conditions (i.e., rules) that partition the data into the desired groups.

To create a Named Grouping, follow these steps:

1. Click the 'New Object' button in the toolbar, and select 'Grouping'. This opens the 'Grouping' dialog box.

2. In the 'Name' field, enter a name for the grouping assembly. This is the title of the grouping object in the Worksheet. (After the grouping object is created, you can edit the grouping name from the text field at the top of the Worksheet.)

3. If you want the grouping to be accessible to all columns of a certain data type, select the desired data type from the 'Type' menu.

For example, you could use the 'starting with' operator to define a grouping based on initial letter (i.e., A, B, C, etc.). If you specified type 'String' for this grouping, you could apply the grouping to any column of that type in a Worksheet or report. This would allow you to reuse the same alphabetical grouping for customer names, com­pany names, product descriptions, and any other column that has 'String' type data.

4. If you want the grouping to be applicable only to a particular column or attribute of a particular data source, select the desired data source from the 'Only for' menu. Select the desired column from the 'Attribute' menu.

You can select a column or attribute from any accessible data source, not restricted to those in the current Worksheet. The group­ing defined for this column or attribute will then be available wher­ever the column or attribute is used in a Worksheet or report.

You can now specify the conditions that define membership in each group of the User defined Grouping.

5. Click the 'Add' button to add a new group. This opens the 'Add Condition List' dialog box. (This is the same as the dialog box used for adding advanced conditions to tables.)

6. In the 'Group Name' field, enter the name of the group you wish to define. (For example, “East Coast states”.)

7. Enter the conditions that define membership in this particular group, and click 'OK'.

8. Repeat the above three steps for each group you wish to add to the grouping:

9. In the 'Grouping' dialog box, choose 'Group all others together' to create a default group called “Others” that will contain all column values that do not satisfy any of the specified group conditions. Otherwise, select 'Leave others in their own group'.

10. Click 'OK' to exit the 'Grouping' dialog box.

The Named Grouping is now shown in the Worksheet as a table whose title is the group name, and whose rows are individual group names. (You can drag the bottom border of the table to see all the group names.)

See Also

Grouping, for information on default grouping operations.

Defining Advanced Conditions, for information on specifying conditions.

Saving an Asset, to save the defined grouping to the Repository.

Using a Named Grouping, to use the grouping in other Worksheets and reports.

Example: Creating a Named Grouping  >>

Suppose you want to create a group for all the states on the west coast, so that every time the customer data is displayed in either a table, chart, or section element in the report, all of the customers from the west coast states are grouped together.

Follow these steps to create the 'WestCoast' group.

1. Create a new Worksheet.

2. Click on the 'New Object' button, and select the 'Grouping' option. This opens the 'Grouping' dialog box.

 

3. Specify “WestCoast” as the name.

4. For the 'Type' select 'String'.

5. Click on the 'Add' button to specify the conditions which the data has to satisfy in order to qualify to be a part of this new group. This opens the 'Add Condition List' dialog.

 

6. Specify 'WestCoast' as the Group Name.

7. Specify the following condition, and click the 'Append' button.

[this][is][one of][WA,OR,CA]

 

8. Click on the 'OK' button to exit the 'Add Condition List' dialog and go back to the 'Group' dialog.

 

9. Click on the 'OK' button.

10. Right-click on the title for the 'WestCoast' group and select 'Set as Primary'.

 

11. Click on the 'Save' button, located in the top toolbar. The 'Save as Worksheet' dialog appears.

12. Specify “WestCoast” as the name of the asset and select 'Global Worksheet' as its scope.

 

13. Click on the 'OK' button to save the newly created user-defined grouping. Notice that the name of the grouping on the asset tree is prepended with a 'Grouping' icon, indicating that the asset is of the 'Named Group' type.

 

 

<< 7.1.2 Extracting a Named Condition from a Table © 1996-2013 InetSoft Technology Corporation (v11.5) 7.3 Creating a Date Range >>