In this example, the City data is included with the Region dat. In this example, the City data replaces the Region data. A sort is selected on Region, which sorts the Region column alphabetically from A -

Pivoting, Drilling, and Sorting Data 4-23 Figure 4–29 Sort Table Dialog Box 3. Select the sorting options and click OK. You can choose from these options in the Sort Table dialog box: Column —The name of the column containing the data you want to sort. You can add additional columns to sort at several levels on the table. See the next section for details. Direction —The sort order of the data in the column. Click the up and down buttons in the Direction box to choose the sort order: ■ Lo to Hi—A to Z for text; increasing for numbers e.g., 1 to 10. ■ Hi to Lo—Z to A for text; decreasing for numbers e.g., 10 to 1. Group —The manner of grouping and displaying sorted data. Click the drop-down button in the Group box and choose one of the options: ■ Group Sort —Data is sorted within each group. The group name appears once at the beginning of the grouped data. ■ Page Break —Mainly for printing reports, this option starts a new page at the start of each new group. The group name appears at the top of the page. ■ Hidden - Sub-group the data at the next hierarchical level, but do not display the sub-grouped item. For example, if the hierarchy is Year, Quarter, Month, sorting on Year with the Hidden option selected sorts on Quarter within Year but does not display the Quarter Item, or line separators for each Quarter. To display sub-grouped Items, change this option to Group. ■ None —The data in the column is not grouped and is all sorted as a unit. Line —The thickness of the line separating the data groups. Click the drop-down button in the Line box and choose a line thickness. The figures in this section show a line for subtotals; you can also use a line when displaying totals. Spaces —The number of cell spaces between groups. Click the up and down buttons in the Spaces box to choose the spacing.

4.3.1.1 Sorting Data Within Data

By adding more sort columns, you can sort data within data. 4-24 Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Discoverer Desktop For example, if you sort data first by Region and then by City, data is sorted alphabetically by Region Central, East, West and then within the Regions alphabetically by City Atlanta, Boston, Miami, and so on. However, if you sort first by Region and then by a numeric column, such as Profit SUM, the data is sorted alphabetically by Region and then numerically by the Profit. Here is an example showing sorting applied to two columns: Figure 4–30 Two Columns Sorted Key to Figure 4–30 :

a. A table sorted on City within Region .

b. A table sorted on Profit SUM within Region.

To add and rearrange columns to sort:

1. On the Sort Table dialog box, click the Add button to see additional columns for

sorting. For example, in the following figure you can add the Department or Profit SUM columns for sorting. Figure 4–31 The Sort Table dialog Key to Figure 4–31 :

a. Column Number.