> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/data-warehousing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/data-warehousing/fundamentals/8-steps-to-design-a-data-warehouse/online-analytic-processing.md).

# Online Analytic Processing

In OLAP cube data can be pre-calculated and pre-aggregated, making analysis faster.

Usually, data is organized in row and column format.

OLAP contains multi-dimensional data, with data from different data sources.

<figure><img src="https://2629735788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3G2NQEHaUSzehWzaKvXK%2Fuploads%2Fgit-blob-c6d0e268d7bcaaeddcb5d720ac87a727f5ef4119%2Folap_cube.png?alt=media" alt=""><figcaption><p>Src:<a href="https://www.holistics.io">https://www.holistics.io</a></p></figcaption></figure>

There are 4 types of analytical operations in OLAP

**Roll-up**: Consolidation, aggregation. Data from different cities can be rolled up to the state/country level.

**Drill-down**: Opposite of roll-up.

If you have data by year, you can analyze monthly, weekly, and daily trends.

**Slice-dice**: Take one dimension of the data from the cube and create a sub-cube.

If data from various products / various quarters are available take one quarter alone and work with it.

**Pivot**: Rotating the data axes.

Basically swapping the x and y-axis of the data.
