WebFOCUS Online Help > Managed Reporting End User > Analyzing Data in an OLAP Report > Sorting Data
In this section: |
You can sort the data in an OLAP report based on the values of dimensions in the hierarchy and/or the values of the quantitative measures that constitute the body of the report. Sorting options vary depending on the nature of the data being sorted. For details, see Sorting Measures and Sorting Dimensions.
You can also group numeric data into any number of tiles (percentiles, quartiles, deciles, etc.). See Grouping Numeric Data Into Tiles.
You can apply aggregation and sorting simultaneously to a numeric measure in an OLAP report, and sort the data from high to low (descending order) or from low to high (ascending order). All other columns are sorted correspondingly.
For the measure being sorted, you can restrict the report to a specified number of highest values (when sorting high to low) or lowest values (when sorting from low to high).
When you sort a measure, any subtotals, subheadings, or subfootings in the report are automatically suppressed since these elements relate to a specific sort field and are not meaningful when the report is resorted by the values in a measure column. For an illustration, see Applying a Percent Calculation to a Measure.
Note: Sorting by measures is not available in a report in which measures have been stacked. See Hiding and Displaying Measures.
To sort the values of a measure from high to low:
or
The report runs automatically. The highest value is now first in the column. The top of the diamond button becomes solid blue to indicate the current sort direction.
To sort the values of a measure from low to high:
or
The lowest value is first in the column. The bottom of the diamond button becomes solid blue.
Tip: After a measure has been sorted, clicking the upper or lower half of the diamond button inverts the sort order of that measure. Place your mouse over either half of the diamond to see a message that indicates the next sort order that will occur if you click that half of the diamond.
The following is an example of sorting a measure from high-to-low in the report.
The OLAP report shows sales information sorted by quarter, store, and product type.
You are interested in seeing where the greatest quantity of goods have been sold.
As shown in the following image, the report now shows data values for the Quantity measure in descending order. The top half of the diamond next to Quantity is blue and solid to indicate the current sort order of the measure. This is now the controlling sort in the report; all other values are reordered correspondingly.
Tip: To invert the sort order, click either the solid or hollow part of the diamond button.
Verify that the Sort panel is checked (this setting is required to apply sorting specifications to the selected measure).
The sort pane is replaced by the Measures pane, where the measure becomes blue to indicate that sorting specifications have been defined.
The diamond button next to the sorted measure changes to reflect the sort order: if High to Low, the top half of the diamond is solid blue; if Low to High, the bottom half is solid blue.
Note:
You can select to view only a subset of the total number of records in your report.
Verify that the Sort check panel is selected (this setting is required to apply sorting specifications to a measure).
or
The default number of sort fields values is 5.
The sort pane is replaced by the Measures pane, where the measure becomes blue to indicate that sorting specifications have been defined.
The following is an example of displaying a subset of sorted data for a measure.
The report shows sales information sorted by quarter, store, and product type.
The sort pane opens, as shown in the following image, in front of the report.
High to Low sorting is selected by default.
Because the report is being sorted from high to low, you can indicate the number of values you wish to see, beginning with the highest.
The main Control Panel window appears. In the Measures pane the Quantity measure is blue to indicate that sorting specifications have been defined.
As shown in the following image, the report now shows Quantity sorted from high to low with the highest four values appearing.
You can remove sorting specifications for a measure whether the measure is appears or hidden.
There are several ways in which you can sort dimensions in an OLAP hierarchy. You can:
The sort pane opens.
The main Control Panel window reopens.
The following is an example of inverting the sort order of a dimension.
In the report, the values of both sort fields— Continent and Region— are sorted from low to high (A to Z) as shown in the following image.
The sort pane opens.
The main Control Panel window reopens.
The main Control Panel window opens.
Both dimensions are now sorted in inverse alphabetical order (Z to A) as shown in the following image.
To restrict the display of sort field values to a certain number of highest or lowest values:
The sorting pane opens.
The main Control Panel window reopens.
The sort pane opens.
The main Control Panel window reopens.
The following is an example of ranking and restricting the number of sort values.
Information for all stores is shown for each quarter. You want to see quarterly information for only the first two stores in alphabetical order (low to high).
The sort pane opens.
The following image shows these three selections on the OLAP Control Panel.
Notice that only two values now appear for each Quarter and ranked low to high within each group as shown in the following image.
You can change the order in which data is sorted and presented in the report. For example, you can change from sorting by State and then by Product to sorting by Product and then by State. If you want to reposition:
In each case, the cursor changes to a plus (+) sign to indicate acceptable places into which you can drop the field. Unacceptable positions are shown by a circle with a slash across the center.
The following is an example of repositioning sort fields in an OLAP report.
The dimension values adjust accordingly. The report now shows the Quantity values from high to low but according to the QUARTER sort order as shown in the following image.
You would like to change the sort order in the report, making Store Name the first sort field, followed by PRODTYPE and QUARTER.
The cursor changes to a plus (+) sign to indicate acceptable places into which you can drop the field.
The report changes immediately as shown in the following image with the Store Name being the first sort order.
Repeat for other fields as needed.
The following is an example of repositioning sort fields from the Control Panel.
The dimension values adjust accordingly. The report now shows the Quantity values from high to low but according to the QUARTER sort order as shown in the following image.
You would like to change the sort order in the report, making Store Name the first sort field, followed by PRODTYPE and QUARTER.
QUARTER is now the third item in the Drill Down list as shown in the following image.
QUARTER appears in the third column of the report as shown in the following image.
You can quickly change a field from one that sorts data vertically, creating rows, to one that sorts data horizontally, creating columns, or vice versa.
To change a:
In each case, the cursor changes to a plus (+) sign to indicate acceptable places where you can drop the field. (Unacceptable places have a circle with a slash across the center.)
The following is an example of pivoting rows and columns in a report.
The report is now sorted vertically, by month, store, and product type as shown in the following image.
You want to create a matrix in which data is sorted horizontally by month, and vertically by store and product type.
The cursor changes to a plus (+) sign to indicate acceptable places where you can drop the field.
In the new report, Quantity and Line Cost of Goods Sold are repeated horizontally for each month as shown in the following image.
You can change a field from one that sorts data vertically, creating rows, to one that sorts data horizontally, creating columns, or vice versa.
The following is an example of pivoting rows into columns from the Control Panel.
The report is now sorted vertically, by month, store, and product type as shown in the following image.
You want to create a matrix in which data is sorted horizontally by month, and vertically by store and product type.
Month moves into the Drill Across pane as shown in the following image.
In the new report, Quantity and Line Cost of Goods Sold are repeated horizontally for each month as shown in the following image.
To use a field to sort your data, but not show the sort field as a column in the report:
The sort pane opens.
The main Control Panel window reopens.
Tip: To expose the hidden sort field, repeat the process and deselect the Hide check pane.
The following is an example of sorting by a hidden field.
The first sort field in the report is QUARTER. You want to retain the sorting but not display this field.
The sort pane opens.
The main Control Panel window reopens.
Report sorting is unchanged, but the QUARTER column no longer appears as shown in the following image.
You can group numeric data into any number of tiles (percentiles, deciles, quartiles, etc.) in tabular reports. For example, you can group students’ test scores into deciles to determine which students are in the top ten percent of the class.
Grouping is based on the values in the selected vertical (BY) field and data is apportioned into the number of tile groups you specify.
The following occurs when you group data into tiles:
1
5
5
5
8
9
In this case, dividing the instances into groups containing an equal number of records produces the following table:
Group |
Data Values |
---|---|
1 |
1,5 |
2 |
5,5 |
3 |
8,9 |
However, because all of the same data values must be in the same tile, the fives (5) that are in group 2 are moved to group 1. Group 2 remains empty. The final tiles look like the following table:
Tile Number |
Data Values |
---|---|
1 |
1,5,5,5 |
2 | |
3 |
8,9 |
WebFOCUS |