# Using data with OLAP

Learn about data options for Wijmo's OLAP components in this documentation topic

## Content


There are a few ways to add data to use with OLAP.

1. connect to server-side OLAP cubes via URL
2. bind to an array or CollectionView object containing the data to summarize

## Binding Data

You can set the datasource via the __PivotEngine__'s itemsSource property.

Example:

```javascript
let engine = wjOlap.PivotEngine();
engine.itemsSource = data; 
```

In the above example, ``data`` is an array of JSON objects with the same property names. After binding to the __PivotEngine__, you can begin taking advantage of the pivoting features. 

## Connect to OLAP Server

When you need a direct connection OLAP data on the server, you need an alternate approach. Wijmo supports connections to OLAP cubes also.  provide the URL to the __PivotEngine__'s itemsSource.

You can connect to:

- Microsoft SSAS cubes
- ComponentOne Web API DataEngine Services

To connect, just provide the URL of the Service to the __PivotEngine__'s itemsSource. All of the operations performed on the data, will be executed on the server.

Example:

```javascript
const url = 'https://developer.mescius.com/componentone/demos/aspnet/c1webapi/latest/api/dataengine/';
let engine = wjOlap.PivotEngine();
engine.itemsSource = url; 
```

The steps above demonstrate simply how to add your data. To view the data and do something meaningful, you need to use the UI components included in __wijmo.olap__. This includes the __PivotPanel__, __PivotGrid__, and __PivotChart__.

Continue to the next guide to learn more about viewing your data in these components.