If the level is in a time dimension, you can select chronological keys and sort the Optional Type a description for the key and then click OK. In the Logical Level dialog, click OK. Double-click a logical level below the Grand Total level. In the Logical

Working with Logical Dimensions 9-9 to the scope of the query. For example, if the scope of the query asks for data from 1999 and 2000, the grand total product revenue is for all products sold in 1999 and 2000. If you have three products, A, B, and C with total revenues of 100, 200, and 300 respectively, then the grand total product revenue is 600 the sum of each products revenue. If you have set up a repository as described in this example, the following query produces the results listed: SELECT product, productrevenue, allproductrevenue FROM sales_subject_area WHERE product IN A or B The results are as follows: PRODUCT PRODUCTREVENUE ALLPRODUCTREVENUE A 100 600 B 200 600 In this example, the AllProductRevenue column always returns a value of 600, regardless of the products on which the query constrains. Identifying the Primary Key for a Dimension Level Use the Keys tab in the Logical Level dialog to identify the primary key for a level. To specify a primary key for a dimension level: 1. In the Business Model and Mapping layer of the Administration Tool, expand a dimension and then expand the highest level Grand Total level of the dimension. 2. Double-click a logical level below the Grand Total level. 3. In the Logical Level dialog, click the Keys tab.

4. In the Keys tab, from the Primary key list, select a level key.

If only one level key exists, it is the primary key by default. 5. To add a column to the list, perform the following steps:

a. In the Logical Level dialog, click New.

b. In the Logical Level Key dialog, type a name for the key.

c. In the Logical Level Key dialog, select a column or click Add.

d. If you click Add, in the Browse dialog, select the column, and then click OK.

The column you selected appears in the Columns list of the Logical Level Key dialog and is automatically selected.

6. If the level is in a time dimension, you can select chronological keys and sort the

keys by name. Note: You cannot use a derived logical column that is the result of a LOOKUP function as part of a primary logical level key. This limitation exists because the LOOKUP operation is applied after aggregates are computed, but level key columns must be available before the aggregates are computed because they define the granularity at which the aggregates are calculated. You can use a derived logical column that is the result of a LOOKUP function as a secondary logical level key. 9-10 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition

7. Optional Type a description for the key and then click OK.

8. Repeat Step 2 through Step 7 to add primary keys to other logical levels.

9. In the Logical Level dialog, click OK.

Selecting and Sorting Chronological Keys in a Time Dimension At least one level of a time dimension must have a chronological key. Although you can select one or more chronological keys for any level and then sort keys in the level, only the first chronological key is used. To select and sort chronological keys for a time dimension: 1. In the Business Model and Mapping layer of the Administration Tool, expand a time dimension and then expand the highest level Grand Total level of the dimension.

2. Double-click a logical level below the Grand Total level.

3. In the Logical Level dialog, click the Keys tab.

4. To select a chronological key, in the Keys tab, select the Chronological Key option.

You may need to scroll to the right to see this option.

5. To sort chronological keys, in the Keys tab, double-click a chronological key.

6. In the Chronological Key dialog, select a chronological key column, click Up or