Creating the OLAP Hierarchy

How to:

This section explains how to create a procedure and use the Dimensions Tool to create a local dimension hierarchy for the procedure. You will later use the local hierarchy with OLAP analytic tools for reporting purposes.


Top of page

x
Procedure: How to Create the OLAP Hierarchy With the Dimensions Tool

To create and name the procedure and select the tool you will use to create the report:

  1. If it is not already open, expand the OLAP project folder.
  2. Click the Procedures folder.
  3. Now right-click the Procedures folder and select New, then select Procedure. The Add Procedure dialog box opens.

    If you can see the inactive procedures in the Procedures folder and want to hide them, click the binoculars binoculars icon icon.

  4. Name the procedure TRADESREP and choose Procedure Viewer from the Create with drop-down list.

    Add Procedure

  5. Click Open.

    The Procedure Viewer opens.

  6. In the Procedure Viewer, click the component connector (yellow diamond) to the right of the Comment component.
  7. Select the Olap Dimensions component from the component connector toolbar.

    OLAP Dimensions

  8. The Open dialog box asks you to specify the data source you will be using to create your hierarchy. Select TRADES.MAS.

    Open

  9. Click Open. The Dimensions Tool opens.

    Open

  10. From the left side of the window, drag the CONTINENT field and drop it directly onto the Dimensions label in the right pane of the Dimensions Tool.

    Dimensions Tool

  11. Right-click the CONTINENT label (located below Dimensions) and select Rename.
  12. Change the CONTINENT label to Location.

    change label

  13. Drag and drop the REGION field onto the CONTINENT field in the right pane of the Dimension Builder. The REGION field appears below the CONTINENT field.
  14. Drag and drop the COUNTRY field onto the REGION field in the right pane of the Dimension Builder. The COUNTRY field appears below the REGION field.
  15. Drag and drop the QTR field onto the Dimensions label.
  16. Rename the QTR label as Date.
  17. Drag and drop the MONTH field onto the QTR field in the right pane of the Dimension Builder. The MONTH field appears below the QTR field.
  18. Drag and drop the DATE_OF_TRADE field onto the MONTH field in the right pane of the Dimension Builder.

    MONTH field

  19. Close the Dimensions Tool and click Yes to update the procedure.

    You have successfully created a hierarchy and return to the Procedure Viewer. From there, you will launch the Join tool to join two data sources.


Top of page

x
Procedure: How to Join the TRADES and BROKERS Data Sources

If a report requires data from two or more related data sources, you can temporarily join the files and report from them as if they were one. Complete the following steps to join the TRADES and BROKERS Master Files.

  1. In the Procedure window, click the diamond to the right of the Dimensions component and select Join from the component connector toolbar.

    Join

    The Open dialog box asks you to specify the data source you will be using to create your hierarchy.

  2. Select TRADES.MAS and click Open.

    select a master file

    The Join tool opens.

  3. Expand the TRADES fields list.

    expand the fields list

  4. Click the Add File expand the fields list button.

    The File Description List for Join dialog box opens.

  5. Select the BROKERS Master File to specify the cross-referenced file for this join. Click Open.

    The Join tool creates a join between the TRADER_ID field in the TRADES Master File and the BROKER_ID field in the BROKERS Master File.

    Join tool

  6. Double-click the double-arrow between the field lists.
  7. Change the Join Name to IDJOIN and click OK.

    Join Properties

  8. Close the Join tool.
  9. Click Yes to update the procedure and return to the Procedure Viewer.

    Now that you have joined these data sources, you can include their fields in the OLAP report you will create in the next exercise.


WebFOCUS