To view the column details, click View to open the Logical Column dialog for that In the Browse dialog, click OK. To view the column details, click View to open the Logical Column dialog for that

8-12 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition Creating Logical Columns The following procedure explains how to create logical columns in the Business Model and Mapping layer. To create a logical column: 1. In the Business Model and Mapping layer, right-click a logical table.

2. From the shortcut menu, select New Object, then select Logical Column.

3. In the General tab, type a name for the logical column.

The name of the business model and the associated logical table appear in the Belongs to Table field.

4. Select Writeable to enable write back for this column. See

Enabling Write Back On Columns for more information.

5. Optionally, you can assign a different column on which to base the sort order for a

column. See Basing the Sort for a Logical Column on a Different Column for details.

6. Optionally, you can assign a descriptor ID column for this column. See

Enabling Double Column Support by Assigning a Descriptor ID Column for details.

7. Optionally, on the Column Source tab, you can specify that this logical column is

derived from other logical columns. See Creating Derived Columns for details.

8. Optionally, on the Aggregation tab, you can set column aggregation. See

Setting Default Levels of Aggregation for Measure Columns for details.

9. Optionally, on the Levels tab, you can associate attributes with a logical level.

Measures can be associated with levels from multiple dimensions and always aggregate to the levels specified. See Associating an Attribute with a Logical Level in Dimension Tables for details.

10. Click OK.

Basing the Sort for a Logical Column on a Different Column For a logical column, you can specify a different column on which to base the sort. This changes the sort order of a column when you do not want to order the values lexicographically. Lexicographical sort arranges the results in alphabetic order such as in a dictionary. In this type of sort, numbers are ordered by their alphabetic spelling and not divided into a separate group. For example, if you sorted on month using a column such as MONTH_NAME, the results would be returned as February, January, March, and so on, in lexicographical sort order. However, you might want months to be sorted in chronological order. Therefore, your table should have a month key such as MONTH_KEY with values of 1 January, 2 February, 3 March, and so on. To achieve the desired sort, you set the Sort order column field for the MONTH_NAME column to be MONTH_KEY. Then, a request to order by MONTH_NAME would return January, February, March, and so on. To assign a different column on which to base the sort order for a column: 1. In the Logical Column dialog, in the General tab, click Set next to the Sort order column field. 2. In the Browse dialog, select a column.

3. To view the column details, click View to open the Logical Column dialog for that

column, and then click Cancel. Working with Logical Tables, Joins, and Columns 8-13 You can make some changes in this dialog. If you make changes, click OK to accept the changes instead of Cancel.

4. In the Browse dialog, click OK.

Enabling Double Column Support by Assigning a Descriptor ID Column When multilingual columns are based on a lookup function, it is common to specify the non-translated lookup key column as the descriptor ID column of the translated column. Assigning a descriptor ID column enables Double Column Support, a feature which helps in defining language-independent filters. For example, in Answers, users see the display column, but the query filters on the hidden descriptor ID column. For more information, see Supporting Multilingual Data in Oracle Fusion Middleware System Administrators Guide for Oracle Business Intelligence Enterprise Edition. Note that double columns are also used for other purposes, like modeling spatial columns. To assign a Descriptor ID column to a display column: 1. In the Logical Column dialog, in the General tab, click Set next to the Descriptor ID column field. 2. In the Browse dialog, select a key column.

3. To view the column details, click View to open the Logical Column dialog for that

column, and then click Cancel. You can make some changes in this dialog. If you make changes, click OK to accept the changes instead of Cancel. 4. In the Browse dialog, click OK. Creating Derived Columns Some columns are derived from other logical columns as a way to apply post-aggregation calculations to measures. To do this, you specify the derived column expression in the Column Source tab of the Logical Column dialog. You can also create a set of derived columns using the Calculation Wizard. See Using the Calculation Wizard for more information. Note that if the parameter PREVENT_DIVIDE_BY_ZERO is set to YES in NQSConfig.INI, the Oracle BI Server prevents errors in divide-by-zero situations, even for Answers column calculations. The Oracle BI Server creates a divide-by-zero prevention expression using nullif or a similar function when it writes the physical SQL. Because of this, you do not have to use CASE statements to avoid divide-by-zero errors, as long as PREVENT_DIVIDE_BY_ZERO is set to YES the default value. See Oracle Fusion Middleware System Administrators Guide for Oracle Business Intelligence Enterprise Edition for more information about NQSConfig.INI settings. You can also apply calculations pre-aggregation. See Defining Physical to Logical Table Source Mappings and Creating Calculated Items for more information. To specify a derived column: 1. In the Logical Column dialog, select the Column Source tab.

2. Select the option Derived from existing columns using an expression.