AI Glossary / Data engineering and architecture / Beginner
OLAP cube
Definition
An OLAP cube is a multidimensional analytical model that organizes measures, such as sales or quantity, by dimensions such as product, location and time. It supports examining the same business information from different perspectives and at different levels of detail.
What it means
OLAP stands for online analytical processing. Here, online refers to interactive analysis rather than a requirement that the data comes from the public internet. A cube is designed to support analytical questions, not simply to record individual operational transactions.
The word cube is a metaphor. A model can have more than three dimensions, and its physical storage need not resemble a three-dimensional array. A cell represents the measure evaluated in a particular combination of dimension members and filters.
Measures and dimensions carry business meaning. Revenue is a measure; a product category is descriptive context. A hierarchy can relate days to months and years, allowing users to move between detail and summary. These relationships and aggregation rules must be defined correctly.
How it works
A cube model connects measures to their underlying observations and dimensions. Data may come from fact and dimension tables or other supported sources. The grain of those observations determines which detailed questions the model can answer.
Queries select dimension members and calculate measures in that context. Slicing selects a particular part of the model, such as one region. Drilling down moves to a more detailed level of a hierarchy, while rolling up summarizes at a higher level. A display can pivot dimensions between rows and columns without changing the underlying meaning.
Implementations use different storage and aggregation strategies. Some values may be precomputed, while others are calculated when queried. It is therefore inaccurate to assume that every possible cell and subtotal must always be stored in advance.
Not every measure can be added in every direction. A balance across successive dates differs from sales occurring during those dates. Distinct counts and ratios also need appropriate calculations. Refresh timing, missing values and dimension changes influence what a displayed result represents.
Three practical examples
- A sales team compares revenue by product category, region and quarter, then drills into a selected month's detail.
- A service organization analyses completed jobs by branch, service type and time period using consistently defined measures.
- A training provider compares enrollments across delivery formats and locations while calculating completion rates from their underlying counts.
Think of it this way
Think of a set of coordinated report views that let you rearrange the questions without rebuilding the definitions each time. The same measures can be viewed through several labeled lenses.
The analogy is limited because the model's relationships and calculation rules determine which views are valid. Rearranging a display does not make incompatible measures or missing data comparable.
Worked example
Rolling up sales across two dimensions
An invented cube records revenue for two products in two regions during one month. Product A has revenue of 120 in North and eighty in South. Product B has ninety in North and 110 in South. All amounts use the same currency and revenue definition.
Rolling up products gives regional totals of 120 + 90 = 210 for North and 80 + 110 = 190 for South. Rolling up regions gives product totals of 200 for A and 200 for B. The overall total is 400.
Selecting North and then inspecting products returns 120 and ninety; it does not change those underlying observations. The cube supplies a different analytical context.
Suppose another measure records month-end inventory. Adding that balance across two months would not mean inventory available at either month end. The convenience of multidimensional navigation does not remove the need to understand each measure's aggregation rules.
Illustrative case study
A fictional learning company builds a cube for course performance. Managers can view starts, completions and completion rates by course, location and month. The first draft averages the percentage shown for each location to calculate the company rate.
Reviewers notice that locations have different numbers of learners. The team defines the company rate using total completions divided by the appropriate total starts, with a clearly stated cohort and time basis. It also labels the cube's latest refresh so that users know which records are included.
An AI reporting assistant uses these measures to describe trends, but it does not invent a different denominator when summarizing them. The case illustrates how a cube's shared definitions can support consistent interpretation only when the definitions themselves are sound.
Common misconceptions and mistakes
- A cube has exactly three dimensions. The term commonly describes a model with any supported number of analytical dimensions.
- Every aggregation is a sum. Ratios, balances and distinct counts require other rules.
- All possible results are precomputed. Storage and calculation strategies vary by implementation.
- A fast result must reflect current operational data. Refresh and processing policies determine freshness.
Business use
An OLAP cube can provide a reusable analytical model for recurring business questions. Its value includes consistent measures and familiar ways to navigate context, not merely faster queries.
Agree on measure definitions, hierarchy relationships and update schedules before broad use. Test totals at several levels and include cases with missing members, changing classifications and unequal group sizes. A model that reconciles at one level can still aggregate incorrectly at another.
For AI-assisted reporting, expose the cube's definitions and selected filters alongside its values. A generated narrative should distinguish an observed change from an explanation of its cause. The cube can show that revenue changed; it does not by itself establish why.
People also ask
Is an OLAP cube the same as a spreadsheet PivotTable?
No. A PivotTable can present multidimensional analysis and may connect to a cube, but it is not itself the same backend model.
Can a cube contain more than one measure?
Yes. Measures may be organized into groups according to the implementation and their source relationships.
Does a cube replace operational databases?
Usually it serves a different purpose: analytical exploration rather than transaction processing.
Check your understanding
A cube displays completion rates for two locations with very different learner counts. Is their unweighted average necessarily the company completion rate?
Answer: No. Calculate the combined rate from the correct underlying counts and consistent cohort definitions, unless a different weighting is explicitly intended.
Related terms
- OLAP
- Fact table
- Aggregation
- dimension
- measure
- hierarchy
- slice and dice
- drill-down
Learn next
Read measure aggregation and grain. Take one report total and trace its source observations, filters and aggregation rule. Check whether changing the time level preserves the intended meaning.
More in Data engineering and architecture
- Object - role modeling - Object - role modeling, often abbreviated ORM, is a conceptual data-modeling approach that describes a business domain through facts and the roles that...
- Object storage - Object storage is a way to store data as individually addressable objects, each containing data and associated metadata.
- Observability (software) - Observability in software is the ability to understand a system's internal behavior by examining the information it exposes.
- One-to-many (data model) - A one-to-many relationship connects one instance of an entity type to potentially several instances of another, while each instance on the many side relates...
- One-to-one (data model) - A one-to-one relationship is a data-model relationship in which each instance on either side is associated with at most one instance on the other side.
- Online complex processing - Online complex processing, or OLCP, is a historical database-workload term for demanding online operations that can combine complex queries, multi-statement...
Sources
Microsoft, Overview of Online Analytical Processing: https://support.microsoft.com/en-us/excel/overview-of-online-analytical-processing-olap. Primary explanation of measures, dimensions and analytical use.
Microsoft, Logical Architecture Overview: https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/olap-logical/logical-architecture-overview-analysis-services-multidimensional-data. Primary implementation documentation illustrating cube structure and optional aggregations; implementation details are not universal requirements. The revenue figures and learning-company case are original illustrations.