Set the summary property Available for Queries to Yes.

13-2 Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer Hierarchies can link items in a business area where no relationship is defined in the database. For more information about business areas, see Chapter 5, Creating and Maintaining Business Areas . What are item hierarchies? Item hierarchies are relationships between items other than dates. An example of an item hierarchy: Figure 13–1 Sales item hierarchy The Sales item hierarchy links a country with its regions, cities and stores. To use this hierarchy a Discoverer end user could use a report that shows sales from a country perspective. The Discoverer end user could then drill down from country to see sales per region, sales per city or sales per store, and then drill back up to the country level. The Sales item hierarchy from a Discoverer end user perspective is shown below. Figure 13–2 Sales item hierarchy - Discoverer end user perspective The figure below shows the Sales item hierarchy from a database perspective. Creating and Maintaining Hierarchies 13-3 Figure 13–3 Sales item hierarchy - database perspective Note that you do not have to specify that Los Angeles is in the West. You only have to specify that City is under Region in your item hierarchy. What are date hierarchies? Date hierarchies are relationships between date items. An example of a date hierarchy: Figure 13–4 Sales date hierarchy The Sales date hierarchy links a year with its quarters, months, weeks and days. To use this hierarchy a Discoverer end user could use a report that shows total sales for each year. The Discoverer end user could then drill down from year to show sales per quarter, sales per month, sales per week and the sales per day, and then drill back up to sales per year. A section of the Sales date hierarchy from a Discoverer end user perspective is shown below. 13-4 Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer Figure 13–5 Sales date hierarchy - Discoverer end user perspective The figure below shows the Sales date hierarchy from a database perspective. Figure 13–6 Sample date hierarchy - database perspective Note: Each level in the date hierarchy is a calculation based on the Sales_ Orders.SALES_DATE column. The calculations are produced by a date hierarchy template for more information, see What are date hierarchy templates? . What are date hierarchy templates? Date hierarchy templates enable you to define a date hierarchy that you can apply to date items. A date item uses information that specifies the date, month, year and time. Discoverer uses this information to calculate for example, quarter, week and days of the week. A date hierarchy template automatically creates items based on a date item, for example to represent the year or month You will find it more efficient to reuse a date hierarchy template by applying it to date items rather than redefining the same date hierarchy repeatedly for each date item. You can use the date hierarchy templates supplied with Discoverer Administrator to define many common date hierarchies, or you can create your own customized date hierarchies. Discoverer Administrator includes a default date hierarchy template see the Date hierarchy template figure below that enables you to drill from year to quarter to month to day: Creating and Maintaining Hierarchies 13-5 Figure 13–7 Date hierarchy template About date hierarchies and performance If you apply a date hierarchy to a date item from an indexed table, a query that includes one of these date items will not use the indexes which can reduce performance. You can optimize performance in Discoverer Plus by applying date hierarchies to date items from tables that do not rely on indexes. Example of how a date hierarchy can affect performance in Discoverer Plus When you load a large fact table that is, a table with many rows that contains a date column for example, transaction_date Discoverer applies the default date hierarchy to the date item for more information, see Load Wizard: Step 4 dialog . Discoverer creates a folder containing date items such as Year, Quarter and Month using the EUL_DATE_TRUNC function for more information, see About truncating date items and the EUL_DATE_TRUNC function . When a Discoverer end user runs queries that include these items, any indexes that include the date item in the fact table are not used. Where indexes are not used, performance can be affected. It is recommended therefore that you do not apply date hierarchies to date items in folders based on fact tables, as fact tables are likely to have indexes. Example of how performance can be retained To retain performance you should apply date hierarchies to a separate dimension table. For example, a transaction_date item in a fact table might join to another dimension table for example, Time Period that specifies time periods. You can load this dimension table using the Load Wizard and apply date hierarchies to it. You can then create a complex folder containing items from both the dimension and fact tables, including the items created by the date hierarchy such as Year or Quarter. When a Discoverer end user uses queries that include date hierarchy items Discoverer can use the date column indexes on the fact table. This can considerably improve performance. How to create item hierarchies To create an item hierarchy: 1. Choose Insert | Hierarchy to display the Hierarchy Wizard: Step 1 dialog .

2. Select the Item Hierarchy option and click Next to display the

Hierarchy Wizard: Step 2 dialog . 13-6 Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer Figure 13–8 Hierarchy Wizard: Step 2 dialog Here you select which items to use in this item hierarchy.

3. Move the items that you want to include in this item hierarchy from the list on the

left to the list on the right. You can select more than one item at a time by holding down the Ctrl key and clicking another item. Note: The order of items in the hierarchy list determines the drill down sequence that the Discoverer end user will use to analyze the data. The item hierarchy is arranged in the order that you include the items. For example, Region - City - Store. Note: You can select items from multiple folders but the folders must be joined. If the folders are joined with more than one join, Discoverer will prompt you with the Choose Join dialog to select the correct join to use.

4. optional To move an item in the hierarchy to a different position, select the item

in the right-hand list and click: ■ Promote to move the item higher in the hierarchy ■ Demote to move the item lower in the hierarchy

5. optional To group two or more items so that they appear on the same level of the

hierarchy, select the items and click Group for more information, see Hierarchy Wizard: Step 2 dialog . You can select more than one item at a time by holding down the Ctrl key and clicking another item. Note: To ungroup a group of items in the hierarchy, select the group and click Ungroup.

6. optional To rename an item, click the item in the right hand list and specify a

name in the Description field. The description you specify is the label the user sees in Discoverer Plus. If you don’t specify a name, by default each level of the item hierarchy uses the item name.

7. Click Next to open the

Hierarchy Wizard: Step 3 dialog name hierarchy . Creating and Maintaining Hierarchies 13-7 Figure 13–9 Hierarchy Wizard: Step 3 dialog

8. Specify a name and description for the new item hierarchy.

9. Click Finish to create the item hierarchy.

Discoverer displays the item hierarchy in the Hierarchies tab of the Workarea. How to create date hierarchies and templates To create a date hierarchy: 1. Choose Insert | Hierarchy to display the Hierarchy Wizard: Step 1 dialog .

2. Select the Date Hierarchy option and click Next to open the

Hierarchy Wizard: Step 2 dialog . Figure 13–10 Hierarchy Wizard: Step 2 dialog 3. optional To create a new date format click New Format... to display the New Date Format dialog . 13-8 Oracle Fusion Middleware Administrators Guide for Oracle Business Intelligence Discoverer 4. Move the date formats to include in this date hierarchy from the list on the left to the list on the right. You can select more than one date format at a time by holding down the Ctrl key and clicking another date format. 5. optional To move a date format in the hierarchy to a different position, select the date format in the list on the right and click: ■ Promote to move the date format higher in the hierarchy ■ Demote to move the date format lower in the hierarchy 6. optional To rename a date format, click the date format in the list on the right and specify the new name in the Description field. The description you specify is the label the user sees in Discoverer Plus. 7. Click Next to display the Hierarchy Wizard: Step 3 dialog . Figure 13–11 Hierarchy Wizard: Step 3 dialog Here you select which date items will use this date hierarchy.

8. Move the date items that will use this date hierarchy from the Available Items list

to the Selected Items list. You can select more than one item at a time by holding down the Ctrl key and clicking another item. Tip : To create just a date hierarchy template, do not select any date items on this page. Later, you can apply this template to date items by modifying their item properties for more information, see How to apply a date hierarchy template to a date item .

9. Click Next to open the

Hierarchy Wizard: Step 4 dialog name hierarchy .