Using Microsoft Excel With OLAP Cubes


<Do not delete this text because it is a placeholder for the generated list of "main" topics when run in a browser>


This tutorial covers how to use Excel 2007 with Oracle OLAP data for easy and powerful ad hoc query and analysis.

NOTE: This tutorial requires either Oracle Database 11.2 or 12.1.

Time to Complete

Approximately 1 hour.


The Simba Technologies MDX Provider for Oracle OLAP allows you to use the powerful and popular ad hoc query and analysis capabilities of Microsoft Excel PivotTables® and PivotCharts® with your Oracle OLAP business intelligence data. PivotTables provide cross-tab functionality to comprehensively present your data in order to answer complex analytical questions. PivotCharts provide visual insight and reporting in a powerful, dashboard-like manner.

Simba’s MDX Provider for Oracle OLAP is a client-side driver that leverages Excel’s strengths for ad hoc query and analysis, as well as new Excel 2007 functionality based upon the latest advances in the multi-dimensional (MDX) data standard.

Simba’s MDX Provider natively connects Microsoft Excel with Oracle OLAP Option. It works seamlessly to parse and process multi-dimensional queries from Excel and integrate with Oracle OLAP via SQL/ODBC.


Using the Oracle OLAP sample schema, you will create an Excel 2007 report to analyze year-end Sales for calendar year 2009, with the objective of finding product dimension members that are underperforming, as compared to the prior year.

To achieve this objective, you will:


You will further analyze the data using interactive ad hoc query techniques to discover trends in the data from a regional perspective.

Finally, you will add a Chart to the report.

Software Requirements

The following is a list of software requirements:


Before starting this tutorial, you should:


Install or have access to Oracle Database 11.2 or 12.1 Enterprise Edition with the OLAP Option.



Download and install the OLAPTRAIN schema following the instructions in Installing the Oracle OLAP Sample Schema.

Notes: The Sample Schema installation package includes two parts:

1. Installing the base OLAPTRAIN schema

2. Installing the SALESTRACK analytic workspace in the OLAPTRAIN schema

Complete both parts of the package.



Install and configure the MDX Provider for Oracle OLAP.

Instructions are found in the MDX Provider for Oracle OLAP - User and Administrator Guide . The guide may be downloaded from This document is also provided by Simba technologies as part of the MDX Provider for Oracle OLAP package.

Follow the instructions for :

  • Installation
  • Client-Side and Excel Configuration



Have access to Microsoft Excel 2007.

Connecting to the Oracle OLAP Cube

In the Prerequistes section, you were instructed to install and configure the MDX Provider for Oracle OLAP.

As part of the configuration process, you must create a Microsoft Data Source Name (DSN) to the Oracle database and the OLAPTRAIN sample schema.

After creating the DSN to the Oracle database, use the Excel Data Connection Wizard to complete the connection process.


Accessing the SALES Cube

Once you click Finish in the Data Connection Wizard, you are presented with the Import Data dialog, shown in Step 4 below. Go to step 4 to continue.

Note: If you are creating a new workbook using an existing connection for the OLAP Sales Cube, start with Step 1 below.


If you have not already done so, create a new , blank workbook as shown here:



Select Data > Existing Connections.

Result: the Existing Connections dialog appears.


In the Existing Connections dialog, select the connection for the Sales Cube, and click Open.

Note: These are the "Friendly Names" and description fields for the connection, as mentioned earlier.



In the Import Data dialog, select the Pivot Table Report and Existing worksheet options. Then click OK.

Result: The MDX provider makes the database connection, finds the cube, places a pivot table placeholder in the worksheet, and populates the Pivot Table Field List pane with Measures and Dimension Hierarcies from the cube.


Creating the Sales Report

As stated in the Scenario section, you will create a report to analyze year-end Sales for calendar year 2009, with the objective of finding product dimension members that are underperforming, as compared to the prior year.

Later, you will further analyze the data to discover trends in the data from a regional perspective, and then finally you will add a Chart to the report.

Use the following steps to create the report, apply some basic formatting, and then add conditional formatting.

Selecting Report Items


In the Pivot Table Field List, select the following four measures, in the following order:

  • Sales
  • Sales Ytd (Year to date)
  • Sales Pr Year (Year for the prior year)
  • Sales Pr Year Pct Ch (Percent change between sales and sales for the prior year).

Result: The data items automatically appear in the Values box and also in the pivot table.

Result: As shown below, only the data for Sales appears, since no Time dimension members have been selected yet. This value, in fact, is the total sales for all dimension members in the cube.




Scroll down in the Pivot Table Field List to view the Dimensions. Drag and drop the Calendar Hierarchy (from the Time dimension) to the Row Labels box, like this:

Result: The top level dimension members of the Calendar_year hierarchy appear in the Row axis of the Pivot Table.



    • Since CY2007 is the oldest year for which data is stored, there are no "prior year' values.
    • The CY2010 time period is currently used for forecasting purposes, and therefore only the 'prior year' values are available in this calendar year


Drag and drop the Standard Hierarchy (from the Product dimension) to the Row Labels box, below Calendar:



Drag the other two dimension hierarchies -- Sales Channel and Regional -- to the Report Filter box, like this:

This action enables you to filter the data by selecting members from either of those two dimension hierarchies on the "page" axis of the report, as shown here:


Applying Formatting

In this subtopic, you apply some basic report formatting to enhance the report clairity, and then you will add condition formatting to assist in revealing important analytic information in the data.

Before you begin formatting the report, close the PivotTable Field List.

Then, follow these steps:


First, turn off gridlines by deselecting the Page Layout > Gridlines > View.



Next, remove the display of Grandtotals.

A. Click the Options tab, and then select the Pivot Table > Options list, like this:

B. In the list, select the Options choice:

Result: The PivotTable Options dialog appears.

C. In the PivotTable Options dialog, click the Totals & Fiters tab, and then turn off the following options (as shown below):

    • Show grand totals for rows
    • Show grand totals for columns
    • Mark totals with *

D. Click OK to apply the formatting changes.


Next, change the layout of the report to display rows in compact form. Click the Design tab, and then select the Report Layout > Show in Compact Form, like this:

Result: The report layout now looks like this:


Finally, turn off the display of pop-up tool-tips within the pivot table.

A. Right-click within the pivot table select PivotTable Options from the pop-up menu:

B. In the Display tab of the PivotTable Options dialog, deselect the Show contextual tooltips option (as shown below), and then click OK.


Next, you add several conditional formatting elements to highlight valuable trends and characteristics of the data.



First, add data bars to each of the measures in order to highlight the relative size of each data cell

A. Select any cell within Sales column of the pivot table. Then select Home > Conditional Formatting > Data Bars > Blue bars, as shown here:

Result: The selected Sales cell is formatted, like this:

B. To apply this format to all Sales cells, click the Formattting Options tool (next to the formatted cell) and select All cells showning 'Sales' values, as shown here:

Result: All Sales cells are formatted with blue bars.



Use the same technique to apply blue bars to the Sales Ytd and Sales Pr Year measures.

After formatting the two additional measures, the report should look like this:



Apply two conditional formats to the Sales Prior Year Percent Change measure.

A. Select any data cell within the Sales Pr Year Pct Chg measure. Then, select Home > Conditional Formatting > Icon Sets > More Rules, as shown here:

B. In the New Formatting Rule dialog, perform the following:

    • In the Apply Rule to section, select All cells showing "Sales Pr Year Pct Chg" values.
    • In the Format Cells Based on their Values section, select:
      • 3 Arrows (Colored) as the Icon Style
      • The Number option as the Type for both the green and yellow arrows
      • The number 10 as the Value for the green arrow

C. Click OK.

Result: The conditional format provides a useful visual indicator of how sales is performing, as percent change comparison to the prior year.

D. Again, select a data cell within the Sales Pr Year Pct Chg measure and then select Home > Conditional Formatting > Icon Sets > More Rules.

E. In the New Formatting Rule dialog, specify the following:

  • In the Apply Rule to section, select All cells showing "Sales Pr Year Pct Chg" values.
  • In the Select a Rule Type section, select Format only cells that contain
  • In the Edit Rule Description section, specify: Cell Value > less than > 0 should be filled with a light red color.


F. Click OK to apply the second format to the Percent Change measure.



Performing and Sharing Ad Hoc Analysis

In this topic, you focus on the calendar year 2009 in order to perform analysis on product performance. You also learn how easy it is to share OLAP reports - including live access to the data.

Initially, high level data shows that sales trends look good for CY 2009. Now, start navigating the data.


Drill on CY2009 (click the "+" icon next to CY2009).

Result: Data for the four quarters of CY2009 appears. Trend indicators are showing some mixed results.



We want to investigate year-end results for 2009, so keep only the Q4 value. Right-click Q4-CY2009, select Filter > Keep Only Selected Item.

Result: all other time members are removed from the report, as shown here:


Remove Calendar year 2009 from the report.

A. Right-click CY2009 and select Show/Hide Fields from the pop-up menu.

B Then, click the Calendar_year option to de-select that field value.

Result: The year level is removed from the report, as shown here:


Next, change the color of the bars to distinguish between Time and Product values. Make Time values Green, and leave Product values Blue.

A. Click in the Q4-2009 Sales cell.

B. Select Conditional Formatting > Data Bars > Green bars.

C. Then, apply the format to All cells showing 'Sales' values for 'Calendar_quarter', as shown here:

Result: The report reflects the new format:

D. Repeat the same techniques to apply Green bars to the Sales Ytd and Sales Pr Year measures.

Result: The report now looks like this:


Next, you add a custom OLAP calculation that provides intelligent insight into product performance. This measure, named Product Alert, identifies any product member where there are performance concerns deaper within the product dimension hierarchy.

Product Alert is an OLAP function that returns one of two text values:

  • "ALERT", for any product member where there is negative sales growth at next lower level in the hierarchy -- when compared to the same period in the prior year.
  • "OKAY", for product members where all decendants at the next level down have positive sales growth.

Note: To learn more about creating OLAP calculations, see the Resources topic.

From the Field List menu, select Product Alert and drag to the Values box, just above Sales, as shown here:

Result: The new measure is added to the report.


Next, add a conditional format that visually highlights any ALERT value.

A. Select any data cell within the Product Alert measure.

B. Select Conditional Formatting > Icon Sets > More Rules.

C. In the New formatting Rule dialog, select the following options (as shown in the image):

    • All cells showing 'Product Alert' values
    • Format only cells that contain
    • Cell Values > equal to > ALERT

D. Then, click the Format button.

E. In the Format Cells dialog:

    • Click the Font tab and select the Bold option
    • Click the Fill tab and choose the color Red
    • Click OK.

The New Formatting Rule dialog now looks like this:

F. Click OK to apply the format.

Result: The report now looks like this:

The Product Alert measure indicates that there are product concerns somewhere within the Computers department -- even though the sales data shows overall good growth in the department for the fourth quarter of 2009 (over 9% growth).

The ALERT value leads us to examine the Computers department.



A. Drill on Computers.

Result: We see that two computer catagories have troubles: All Computer Furniture and total Server Computers.


  • As indicated by the ALERT on the Computers department, we knew that there was at least one product category (the next level in the hierarchy) with negative sales growth. As we can see, sales for the All Computer Furniture category have dropped almost 29% in Q4-2009 as compared to Q4-2008.
  • In addition, an ALERT is raised on Total Server Computers. Even though the sales growth numbers are positive for this category (a 3.48% increase), the alert tells us that there is a negative sales growth problem at the next deaper level in the hierarchy (Product Type) for Total Server Computers.


Now, let's examine another product category: Total Personal Computers.

Initial observations include the following:

  • The blue data bars show that Personal Computers is the largest category in terms of sales contribution to the Computers department.
  • Sales growth for Total Personal Computers in Q4-FY2009 looks good (over a 10% increase).
  • There is no ALERT for product types within this category (that is, at the next lower level in the hierarchy).

A. To provide more analytic focus, remove the Sales Ytd measure: Right-click on the Sales Ytd measure heading, and select Remove Sales Ytd, as shown here:

B. Then, drill on Total Personal Computers.

Observations include the following:

  • We see that several product types within the Total Personal Computers category have ALERT conditions.
  • Although none of these product members show negative sales growth, we know that product members at the next deaper level in the hierarchy are underperforming.
  • From the blue data bars, we can quickly identify that the three largest contributing Personal Computer product types -- Computer Storage, Personal Computers, and PC Sound -- all contain negative sales growth problems at the next hierarchy level.

C. Drill on Personal Computers.


  • The largest contributing Personal Computer subtype (MacBook) had an 8% drop in Q4-2009 sales as compared to Q4-2008.
  • This, and other important product sales information is worth sharing with the Director of Sales for the Computers division.

Sharing OLAP Reports

Sharing an Excel report against OLAP data is extremely simple and powerful. You can:

A) Save the worksheet as a file and attach it to an email.

  • If the recipient has the MDX provider and access to the cube, they can then open up the report and go live against the cube.
  • If the recipient does not have access to the cube, they can view the static report in Excel.

B) Copy the contents of the report and paste it in another MS office application, such as Powerpoint or Word.

  • The Excel worksheet has a live connection to the OLAP data, and the Powerpoint or Word document has a live connection to the worksheet.
  • If the Excel report is changed in any way, the Powperpoint or Word document automatically updates.


Focus the product analysis solely on the Personal Computers category, and for different geographical regions.

A. Right-click Total Personal Computers and select Filter > Keep Only Selected Items, like this:

B. Then, drill on Total Personal Computers and right-click on any Product member in the Row Labels column. From the resulting pop-menu, select Show/Hide Fields > Department.

Result: This action hides (turns off the display) of the Department level in the hierarchy. The report now displays only category level members, for which Personal Computers is the only selected member.

Finally, use the Regional report filter to select Geography dimension members.

C. Select United States from the report filter by drilling through the Regional Geography hierarchy and clicking OK, like this:

Result: The report updates for the filtered selection.

D. Select other countries or geographic areas by using the Regional report filter. The report updates all stored and calculated data.

Adding A Chart

In this topic, you will re-orient the report to provide a regional perspective on sales of the Total Personal Computer market for the year 2009. Then, you will add a chart to the report to illustrate the monthly trends for this product category.

Follow these steps:


A. Collapse the drill on Total Personal Computers, and then click the Row Labels Filter tool, like this:

B. Choose Calendar_year from the Select field box, like this:


C. Drll on CY2009, select each of the Quarter members (as shown below), and then click OK.

D. In the pivot table, drill on all four quarters so that all of the 2009 month members are displayed.

F. Then, right-click Jan-2009 and select Show/Hide Fields > Calendar_quarter.

Result: This action removes both the Quarter and Year level members. The Row Labels axis now looks like this:



Use the PivotTable List to re-orient the report. Perform the following:

  • Deselect all measures from the Values list except for Sales.
  • Move the Standard (Product) hierarchy to the Report Filter area.
  • Move the Regional (Geography) hierarchy to the Column Lables area.

The Field area pane looks like this:

Result: the report looks like this:


Filter the report as follows:

A. Using the Standard (Product) report filter, select Total Personal Computers and then click OK.

B. Using the the Column Labels report filter, de-select Oceania and then click OK.

Result: The report should look like this:


Resize the data columns so that they are the same width.

A. Select columns B through F, right-click the selection, and choose Column Width from the pop-up menu, like this

B. Enter 15 as the column width value and click OK.

Result: The data bars indicate that Asia has contributed the largest amount of sales in the Personal Computer category across the selected regions regions over the calendar year of 2009.



Finally, add a Chart to enhance the new report.

A. Again, select columns B through F.

B. Select Insert > Column > Stacked Column 3D from the pop-up menu, like this:

Result: A chart is added to the report.

C. Dismiss the PivotChart Filter Pane.

D. Move the chart below the pivot table, and resize the chart, like this:

Observations: The chart adds value to the worksheet, clearly indicating:

  • The relative contribution of each region to Total Personal Computer sales
  • 2009 monthly trends for each region in the Total Personal Computer product category


You can use MS Excel 2007 (and 2003) with Oracle Database to easily create BI reports from OLAP cubes and perform powerful ad-hoc analysis against live data. The live connection to OLAP cubes is created by Simba’s MDX Provider, which natively connects Microsoft Excel with the Oracle OLAP Option.

In this tutorial, you have learned how to:


The following resources provide additional information for topics covered in this tutorial: