# What is an OLAP Cube?
URL: https://pro.rv-grid.com/guides/pivot/introduction/olap-cube-concepts/
Source: src/content/docs/guides/pivot/introduction/olap-cube-concepts.mdx
Description: Understand the multidimensional "Cube" metaphor and how Online Analytical Processing (OLAP) powers advanced data discovery.
When working with RevoGrid Enterprise Pivot, you will often hear the term **OLAP** (Online Analytical Processing) or **OLAP Cube**. While the name sounds complex, the concept is fundamental to modern business intelligence.

## The "Cube" Metaphor

In a traditional spreadsheet, data is 2-dimensional (Rows and Columns). In an **OLAP Cube**, data is **Multidimensional**.

Think of a "Cube" where each side represents a different category (a **Dimension**):
1.  **Product** (what we sold)
2.  **Time** (when we sold it)
3.  **Geography** (where we sold it)

Inside the cube, at the intersection of these three dimensions, lies the **Measure** (e.g., Sales Amount).

By "rotating" this cube, you can view the data from any angle. In RevoGrid Pivot, this "rotation" happens when you move fields between the Rows and Columns axes.

## Core OLAP Operations

OLAP cubes are designed to support four primary analytical operations, all of which are supported by RevoGrid:

### 1. Slicing
Slicing is like taking a single "slice" of the cube.
-   **Concept**: Picking one value for a dimension.
-   **Example**: "Show me sales only for the **Year 2024**."
-   **In RevoGrid**: This is achieved through [Filtering](/guides/pivot/sorting-filtering/).

### 2. Dicing
Dicing is like cutting a smaller "sub-cube" out of the big one.
-   **Concept**: Picking specific values across multiple dimensions.
-   **Example**: "Show me sales for **Electronics** in the **North Region** during **Q1**."
-   **In RevoGrid**: This is achieved by combining filters and row/column grouping.

### 3. Drill-Down / Drill-Up
Moving through the levels of a hierarchy.
-   **Concept**: Going from summarized data to detailed data (Drill-Down) or back (Drill-Up).
-   **Example**: Looking at sales by **Year**, then clicking to see **Quarters**, then **Months**.
-   **In RevoGrid**: Enabled via the `collapsed` property in [Drill-Down](/guides/pivot/drilldown/).

### 4. Pivoting (Rotating)
Changing the orientation of the axes.
-   **Concept**: Swapping Rows and Columns to see the data differently.
-   **Example**: Moving "Region" from the Row axis to the Column axis to compare regions side-by-side.
-   **In RevoGrid**: Performed via the [Configurator](/guides/pivot/configurator/) or by updating the `rows` and `columns` arrays in your code.

## Why "Cube" vs. "Flat Table"?

| Feature | Flat Table (SQL) | OLAP Cube |
| :--- | :--- | :--- |
| **Speed** | Slow for large aggregations (calculates on the fly) | Fast (aggregations are often pre-calculated) |
| **Complexity** | Requires complex `JOIN` and `GROUP BY` logic | Logical, business-friendly dimensions |
| **Scale** | Hard to scale to billions of rows for real-time UI | Designed for massive analytical scale |

## How RevoGrid Fits In

RevoGrid acts as the **Viewer** for your OLAP data.
-   **Client-Side**: RevoGrid builds a "virtual cube" in memory from your flat JSON data.
-   **Server-Side**: RevoGrid communicates with a real OLAP engine (like Snowflake, ClickHouse, or Cube.js) using the [Remote API](/guides/pivot/remote-api-reference/).

## Next Steps

Now that you understand the "Cube" metaphor, learn how to prepare your data for these operations in [Data Modeling for Pivot](/guides/pivot/data-modeling/).
