Sunday, 20 September 2015

Creating a Repository Using the Oracle Business Intelligence Administration Tool ( part 5 )

LAB 3:Creating Calculation Measures
In this set of steps you use existing measures to created a derived calculation measure. To create a derived calculation measure you perform the following steps:
  • Open the Repository in Offline Mode
  • Create a Calculation Measure Derived from Existing Columns
  • Create a Calculation Measure Using a Function
  • Load the Repository
  • Create and Run an Analysis
  • Check the Query Log
Open the Repository in Offline Mode
1 .
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.

2 .
Select File > Open > Offline.
Screenshot for Step

3 .
Select BISAMPLE.rpd and click Open. Do not select any BISAMPLE repository with an extension, for example, BISAMPLE_BI0025.rpd. Recall that these are the repositories that have been loaded into Oracle BI Server memory.
Screenshot for Step

4 .
Enter BISAMPLE as the repository password and click OK to open the repository.
Screenshot for Step

Create a Calculation Measure Derived from Existing Columns
1 .
In the BMM layer, expand Sample Sales > F1 Revenue.
Screenshot for Step

2 .
Right-click F1 Revenue and select New Object > Logical Column to open the Logical Column dialog box.
Screenshot for Step

3 .
On the General tab, enter Actual Unit Price in the Name field.
Screenshot for Step

4 .
Click the Column Source tab.
Screenshot for Step

5 .
Select Derived from existing columns using an expression.
Screenshot for Step

6 .
Click the Edit Expression button to open Expression Builder.
Screenshot for Step

7 .
In the left pane select Logical Tables > F1 Revenue > Revenue.
Screenshot for Step

8 .
Click the Insert selected item button to move the Revenue column to the right pane.
Screenshot for Step

9 .
Click the division operator to add it to the expression.
Screenshot for Step

10 .
In the left pane select Logical Tables > F1 Revenue and then double-click Units to add it to the expression.
Screenshot for Step

11 .
Click OK to close Expression Builder. Notice that the formula is added to the Logical Column dialog box.
Screenshot for Step

12 .
Click OK to close the Logical Column dialog box. The Actual Unit Price calculated measure is added to the business model.
Screenshot for Step

13 .
Drag Actual Unit Price from the BMM layer to the Base Facts presentation table in the Presentation layer.
Screenshot for Step

14 .
Save the repository and check consistency. Fix any errors or warnings before proceeding.

Create a Calculation Measure Using a Function
1 .
In the BMM layer, right-click F1 Revenue and select New Object > Logical Column to open the Logical Column dialog box.
Screenshot for Step

2 .
On the General tab, enter Revenue Rank in the Name field.
Screenshot for Step

3 .
Click the Column Source tab.
Screenshot for Step

4 .
Select Derived from existing columns using an expression.
Screenshot for Step

5 .
Click the Edit Expression button to open Expression Builder.
Screenshot for Step

6 .
In the left pane select Functions > Display functions > Rank .
Screenshot for Step

7 .
Click the Insert selected item button to move the Rank function to the right pane.
Screenshot for Step

8 .
Click <<numExpr>> in the expression.
Screenshot for Step

9 .
In the left pane select Logical Tables > F1 Revenue and then double-click Revenue to add it to the expression.
Screenshot for Step

10 .
Click OK to close Expression Builder. Notice that the formula is added to the Logical Column dialog box.
Screenshot for Step

11 .
Click OK to close the Logical Column dialog box. The Revenue Rank calculated measure is added to the business model.
Screenshot for Step

12 .
Drag Revenue Rank from the BMM layer to the Base Facts presentation table in the Presentation layer.
Screenshot for Step

13 .
Save the repository and check consistency. Fix any errors or warnings before proceeding.
Screenshot for Step

14 .
Close the repository. Leave the Admin Tool open.

Load the Repository
1.
Return to Fusion Middleware Control Enterprise Manager, which should still be open. If not, open a browser and enter the following URL to navigate to Fusion Middleware Control Enterprise Manager:
http://<machine name>/:7001/em
In this tutorial the URL is http://localhost:7001/em
 
2.
If necessary, log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
Screenshot for Step
3 .
In the left navigation pane, expand Business Intelligence and click on coreapplication.
Screenshot for Step

4 .
Click the Deployment tab.
Screenshot for Step

5 .
Click the Repository sub tab.
Screenshot for Step

6 .
Click Lock and Edit Configuration.
Screenshot for Step

7 .
Click Close when you receive the confirmation message Lock and Edit Configuration - Completed Successfully.
Screenshot for Step

8 .
Click Browse and navigate to the directory with the BISAMPLE repository.
Screenshot for Step

9 .
Select the BISAMPLE.rpd file and click Open.
Screenshot for Step

10 .
Enter BISAMPLE as the repository password and confirm the password.
Screenshot for Step

11 .
Click Apply.
Screenshot for Step

12 .
Confirm that the default RPD is now BISAMPLE with an extension. In this example the file name is BISAMPLE_BI0025.
Screenshot for Step

13 .
Click Activate Changes.
Screenshot for Step

14 .
Click Close when you receive the confirmation message Activate Changes - Completed Successfully.
Screenshot for Step

15 .
Click Restart to apply recent changes to navigate to the Overview page (this may take a moment).
Screenshot for Step

16 .
On the Overview page, click Restart.
Screenshot for Step

17 .
Click Yes when you receive the message Are you sure you want to restart all BI components?
Screenshot for Step

18 .
Allow the processing to complete.
Screenshot for Step

19 .
Click Close when you receive the message Restart All - Completed Successfully.
Screenshot for Step

Create and Run an Analysis
1.
Return to Oracle BI, which should still be open. If not, open a browser or browser tab and enter the following URL to navigate to Oracle Business Intelligence:
http://<machine name>/:9704/analytics
In this tutorial the URL is http://localhost:9704/analytics.
 
2.
If necessary, log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
3 .
In the left navigation pane, under Create... Analysis and Interactive Reporting, select Analysis. Hint: If your session has not timed out, you can create a new analysis by selecting New > Analysis.

4 .
Select the Sample Sales subject area.

5 .
In the left navigation pane, expand the Base Facts folder and confirm that the Actual Unit Price and Revenue Rank columns are visible.
Screenshot for Step

6 .
Create the following analysis by double-clicking column names in the Subject Areas pane:
Products.Product
Base Facts.Revenue
Base Facts.Revenue Rank
Base Facts.Units
Base Facts.Actual Unit Price
Screenshot for Step

7 .
Sort Revenue Rank in ascending order.
Screenshot for Step

8 .
Click Results to view the analysis results.
Screenshot for Step
Please note that the Actual Unit Price calculation is correct, although it does not make sense from a business perspective. For example, the unit price for an LCD HD Television would not be 9 dollars. This is a result of the underlying sample data.
 
Check the Query Log

1 .
Return to Fusion Middleware Control Enterprise Manager, which should still be open, and check the query log. If you need help, click here to review steps from earlier in this tutorial.

2 .
Your log entry should look similar to the screenshot.
Screenshot for Step
Note that the division of Revenue by Units is calculated in the outer query block (D1.c2 / nullif ( D1.c1, 0) as c3 in this example). Because you defined the Actual Unit Price calculation using logical columns, the SUM aggregation rule is applied to the Revenue and Units columns first and then the division is calculated.

3 .
Leave Enterprise Manager open.

No comments:

Post a Comment