Select an Item then click Paste to copy the Item into the Calculation box. Click the Functions button to show a list of function folders. To display a list of

8-12 Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Discoverer Desktop Select Item —displays a dialog box that lists the items currently defined for the worksheet. Select an item to become the value of the advanced conditional expression. Select Parameter —displays a dialog box that lists the parameters currently defined for the worksheet. Select an parameter to become the value of the advanced conditional expression. New Parameter —displays the Parameter dialog box, and you can create a parameter to be the value of the condition. Create Subquery —displays a dialog box for creating a subquery as the value portion of the condition. See the next section for details. Edit Subquery —this option only appears if you’re using a subquery to determine the value; the Edit Subquery dialog box appears so you can edit the previous selections for the subquery. 5. Click OK when the advanced condition is complete.

8.4.1 Creating Subqueries

A subquery for a condition uses a value that requires an intermediate step to determine the value. For example, suppose you want to create a condition that finds all the sales profits that exceed the median profit amount. The intermediate step is to find the median profit amount. Often, you create a separate worksheet to determine the intermediate value. The subquery then identifies the intermediate value on its worksheet as the value for the condition. To create a subquery:

1. Choose Create Subquery from the Values drop-down list on the New Condition

dialog box. See Figure 8–12 above. The Create Subquery dialog box appears. Figure 8–13 Create Subquery Dialog Box 2. If you’ve already created a worksheet that contains the intermediate value, select it from the first drop-down list on the dialog box. Advanced Discoverer Desktop Features 8-13 If you need to create a new worksheet that calculates the intermediate value, click the New button. The New Sheet dialog box appears so you can create a new worksheet for the value. 3. In the second drop-down list, select the original item to be used for the condition. For example, when finding sales profits that exceed the median, the item to select in the second drop-down list is profits. See the next section for a description of correlated items. 4. Click OK. The name of the worksheet appears in the Values portion of the condition on the New Condition dialog box.

8.4.1.1 Using Correlated Items

Correlated items add another dimension to a subquery. For example, suppose you want to find all the sales profits that exceed the median profit amount by department. The “by department” portion of the value is the new dimension to the subquery. The items to correlate usually appear on both the original worksheet, and the worksheet used to create the intermediate value. For example, on the original worksheet you can find profit data for each department. On the worksheet for calculating the intermediate value, you can find a median value for each department. Correlating the two items matches them so each department median value corresponds to each department profit value. Correlating items is also necessary when the worksheet for determining the intermediate value has additional values on it. Correlating makes sure the condition uses the correct intermediate values for the items. As stated on the dialog box, you don’t need to use the features for correlated items if the subquery does not include the extra dimension provided by items that correlate to one another. To use correlated items:

1. Click the Add button on the Edit Subquery dialog box.

2. Choose the item from the Add drop-down list.

The following figure shows an example. The item then appears in the box for correlated items. Note: Correlated Subqueries cannot contain filters using Oracle Analytical Functions. For example, if you restrict the values returned in a sheet to the top twenty items assigned using a Rank function, you cannot use this sheet in a correlated subquery.