[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Collapse]Getting Started
     Lesson 1 - Bind a Pivot Grid to an MDB Database
     Lesson 2 - Bind a Pivot Grid to an OLAP Cube
     Training Videos
     Included Components
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Lesson 2 - Bind a Pivot Grid to an OLAP Cube

A cube is a multidimensional structure defined by its measures and dimensions. You can think of a measure as a data field in PivotGridControl, while a dimension can be represented by a column field or a row field. This tutorial will help you learn how to bind a pivot grid to an existing OLAP (OnLine Analytical Processing) cube. In this example, we will use the Adventure Works cube.

To display data from an OLAP cube, do the following.

Expanded Specify a connection string to an OLAP cube.

  1. Run MS Visual Studio. Create a new WPF Application project and add PivotGridControl as you did in Lesson 1.
  2. Click the smart tag icon () displayed at the top-right of the pivot grid to invoke the Pivot Grid Control Tasks popup window.

  3. In the invoked wizard, select OLAP Cube technology and click Next.

  4. Select the ADOMD.NET as a data provider and click Next.

  5. In the next window, select the MSOLAP provider and specify the Server Name as https://demos.devexpress.com/Services/OLAP/msmdpump.dll. Then, click the Retrieve Schema button.

    Make sure that the following parameters are specified.



    Identifies the data provider to be used. The "MSOLAP" string identifies the latest version of the OLE DB provider.

    Server Name


    Specifies either the name of a server that runs an instance of Microsoft SQL Server Analysis Services (SSAS), the path to a cube file or the path to a data pump.

    Catalog Name

    Adventure Works DW Standard Edition

    Specifies a data catalog that contains cubes.

    Cube Name

    Adventure Works

    Specifies the name of a cube that provides OLAP data.

    The image below demonstrates configured settings of the OLAP connection. Click Finish to close the wizard.

Expanded Create Fields

  1. Click the pivot grid's smart tag and use the Add Data Area Field menu item to add a new field to the Data Header Area. In a similar manner, add two fields both to the Column Header and Row Header areas.

  2. To associate created fields with OLAP measures/dimensions, click the field's smart tag icon. In the invoked menu, click the FieldName property ellipsis button to see existing data source fields.

    Select the following measures and dimensions for created fields.

    • For the data field, select the [Measures].[Internet Sales Amount] measure.
    • For the column fields, select the [Date].[Fiscal].[Fiscal Year] and [Date].[Fiscal].[Fiscal Quarter] dimensions.
    • For the row fields, select the [Customer].[Country].[Country] and [Customer].[City].[City] dimensions.

    After this, your XAML should look like the following. If it does not, you can overwrite your code with:

Expanded Result

Run the project and see the result.

Expanded See Also

Is this topic helpful?​​​​​​​