Your search did not match any results.

OLAP Data Source

The PivotGrid component supports OLAP services (Microsoft SQL Server Analysis Services). This demo shows how to use a remote OLAP cube as the PivotGrid's data source.

Configure the Store

Use XmlaStore to connect your component to an OLAP storage. Specify the following properties to configure it:

  • url
    The OLAP server's URL.

  • catalog
    The initial catalog that contains the OLAP cube.

  • cube
    The name of the OLAP cube to use from the catalog.

Pass the XmlaStore to the store property of the PivotGridDataSource component. Assign the component to the PivotGrid's dataSource property.

Configure PivotGrid Fields

To display data in the PivotGrid, assign an array to the fields[] property. Each object in this array configures a single pivot grid field. Assign a field name to the dataField property to populate the pivot grid field with data.

You can distribute fields between four different areas: row, column, filter, and data. To specify the area, set the area property. Add measures to the "data" area and dimensions to other areas. Fields that do not belong to any area are displayed in the field chooser.

Backend API
<div class="long-title"><h3>Sales Statistics</h3></div> @(Html.DevExtreme().PivotGrid() .AllowSortingBySummary(true) .AllowSorting(true) .AllowFiltering(true) .AllowExpandAll(true) .Height(570) .ShowBorders(true) .FieldChooser(fc => fc.AllowSearch(true)) .DataSource(d => d .Fields(fields => { fields.Add() .DataField("[Product].[Category]") .Area(PivotGridArea.Row); fields.Add() .DataField("[Product].[Subcategory]") .Area(PivotGridArea.Row) .HeaderFilter(hf => hf.Search(hfs => hfs.Enabled(true))); fields.Add() .DataField("[Ship Date].[Calendar Year]") .Area(PivotGridArea.Column); fields.Add() .DataField("[Ship Date].[Month of Year]") .Area(PivotGridArea.Column); fields.Add() .DataField("[Measures].[Reseller Freight Cost]") .Format(Format.Currency) .Area(PivotGridArea.Data); }) .Store(s => s.Xmla() .Url("https://demos.devexpress.com/Services/OLAP/msmdpump.dll") .Catalog("Adventure Works DW Standard Edition") .Cube("Adventure Works") ) ) )
using DevExtreme.MVC.Demos.Models.SampleData; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class PivotGridController : Controller { public ActionResult OLAPDataSource() { return View(); } } }
.long-title h3 { font-family: 'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana; font-weight: 200; font-size: 28px; text-align: center; margin-bottom: 20px; }