In the Business Model and Mapping layer, create a new logical column. Name the In Expression Builder, select the Ago function to create a template for the Select the first argument, Measure, then use the selection panes to select the base Select the secon

Working with Logical Dimensions 9-27 As with any level key, be sure the key is unique at its level. For example, a column containing simple month names such as January is not unique unless it is concatenated to a column containing year names. Figure 9–12 shows how to designate a chronological key in the Logical Level dialog. Figure 9–12 Designating a Chronological Key in the Logical Level Dialog Creating AGO, TODATE, and PERIODROLLING Measures You can build time series measures by creating derived expressions from base measures. To do this, create a new logical column and select Derived from existing columns using an expression , then open Expression Builder to build the appropriate time series function. Follow these guidelines when modeling time series functions: ■ Time series functions cannot be derived from measures that use the fragmentation form of federation. This rule prevents some complex boundary conditions and cross-source assumptions in the query generation and result merging, such as the need to join some time dimension rows from one source to some of the fact rows in a different source. ■ To reduce maintenance and increase accuracy, it is best to create a single base measure, and then derive a family of time series measures from it. For example, start with a base measure, then define variations for month-ago, year-ago, month-to-date, and so on. To do this, select Derived from existing columns using an expression and refer to the base measure in the expression. Example 9–3 shows how to build the AGO measure. See Appendix C, Logical SQL Reference for detailed syntax for the other time series functions, TODATE and PERIODROLLING. Example 9–3 Creating the AGO Measure This example explains how to create one of the derived AGO measures in the Sampleapp demonstration repository.

1. In the Business Model and Mapping layer, create a new logical column. Name the

column 2-04 Billed Qty Mago. 2. In the Column Source tab, select Derived from existing columns using an expression and click the Expression Builder button.

3. In Expression Builder, select the Ago function to create a template for the

arguments. To do this, select Functions in the Category pane, Time Series Functions in the Functions pane, and Ago in the Time Series Functions pane. Figure 9–13 shows the AGO function in Expression Builder. 9-28 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition Figure 9–13 AGO Function in Expression Builder

4. Select the first argument, Measure, then use the selection panes to select the base

measure from which to derive this column. In this example, select Sample Sales.F0 Rev Base Measures.2-01 Billed Qty Sum All.

5. Select the second argument, Level, then use the selection panes to select the unit of

the ago offset. It must be defined as a level of the time dimension, so that it can take advantage of the chronological keys built in the time dimension. In this example, select Time Dimensions in the Category pane, HO Time in the Time Dimensions pane, and Month in the HO Time pane. Figure 9–14 shows the Month level in Expression Builder. Figure 9–14 Selecting the Level Argument in Expression Builder 6. Select the third argument, Number of Periods, and enter the size of the offset you want to use for this measure. In this example, type 1. Working with Logical Dimensions 9-29

7. Click OK in the Expression Builder dialog, then click OK in the Logical Column

dialog. 9-30 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition 10 Managing Logical Table Sources Mappings 10-1 10 Managing Logical Table Sources Mappings Logical table sources define the mappings from a single logical table to one or more physical tables. The physical to logical mapping can also be used to specify transformations that occur between the Physical layer and the Business Model and Mapping layer, as well as to enable aggregate navigation and fragmentation. One logical table source folder exists for each logical table. The folder contains one or more logical table sources. You can also view logical table sources from the Sources tab of the Logical Table dialog. Logical tables can have many physical table sources. A single logical column might map to many physical columns from multiple physical tables, including aggregate tables that map to the column if a query asks for the appropriate level of aggregation on that column. This chapter contains the following topics: ■ Creating Logical Table Sources ■ Defining Physical to Logical Table Source Mappings and Creating Calculated Items ■ Defining Content of Logical Table Sources ■ Working with Parent-Child Settings in the Logical Table Source ■ Setting Up Aggregate Navigation by Creating Sources for Aggregated Fact Data ■ Setting Up Fragmentation Content for Aggregate Navigation Creating Logical Table Sources When you create logical tables and columns by dragging and dropping from the Physical layer, the logical table sources are generated automatically. If you create the logical tables manually, you need to also create the sources manually. You also add new logical table sources when multiple physical tables can be the source of information. For example, many tables could hold information for revenue. You might have three different business units each with its own order system where you get revenue information. In another example, you might periodically summarize revenue from an orders system or a financial system and use this table for high-level reporting. Use the General tab of the Logical Table Source dialog to define general properties for the logical table source. To create a logical table source: 10-2 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition 1. In the Business Model and Mapping layer of the Administration Tool, right-click a logical table and select New Object, then select Logical Table Source. 2. In the Logical Table Source dialog, in the General tab, type a name for the logical table source.

3. Click the Add button. In the Browse dialog, you can view joins and select tables