Skip to Content

The 4 basic OLAP operations: looking at company data from any angle without writing new SQL every time

Every time the owner of a company asks a new question about the numbers — "how do late deliveries look for this customer this quarter?", "which warehouse is causing the delays?" — someone has to go back into the database, write a new query, and come back with an answer a day or two later. Ask a different question next week and the whole cycle repeats. The frustrating part is that the underlying data barely changes between these questions. Only the angle you're looking from changes. If every new angle requires a new custom SQL query, reporting stops being something an owner can use directly and turns into a permanent backlog sitting on someone else's desk.

The data cube behind the questions

The reason this can get easier is not a smarter query — it's a different way of modeling the data in the first place. In data warehousing, analytical data is organized as a hypercube (Hyperwürfel), an n-dimensional data cube. Instead of rows in a flat table, you define dimensions — time, product, customer, warehouse — and a measure that sits inside the cube at the intersection of those dimensions, such as order value or delivery time. A late-delivery figure, for example, exists simultaneously by month, by customer, by product, and by warehouse, all at once, inside the same cube.

Four ways to look at the same cube

Once the data is shaped this way, four standard operations let anyone explore it without writing a new query for every new question:

  • Slicing — fix one dimension to a single value, e.g. "just this quarter," to see a flat 2D slice of the cube.
  • Dicing — filter on several dimensions at once, e.g. "this quarter AND this customer AND this warehouse," to pull out a smaller sub-cube.
  • Drill-down — move from a summary level to more detail, e.g. from yearly totals down to monthly, or from a customer group down to one specific customer.
  • Roll-up — the reverse: aggregate from detail back up to a summary, e.g. from individual orders back up to a monthly total.

None of these require touching the database again. They are just different views of the same cube, chosen by clicking, not by writing SQL.

Try it yourself: rotate the cube

The four operations above are easier to feel than to read about. Below is the same idea as an actual 3D cube — drag it to rotate, then click one of the four operations to see exactly which cells get selected.

Interactive: drag the cube to rotate, then click an operation

Drag to rotate. Click an operation to see it applied to the cube.

See it with example numbers

The cube below uses the same three dimensions — quarter, customer, warehouse — but now each cell holds an actual late-delivery count. Click an operation and watch the number update live, the same way a real OLAP tool would answer the question instantly instead of waiting for a new report.

Example data — not a real client

Same cube, now with a number in every cell

Drag to rotate. Click an operation to see the number update — same four clicks, real numbers.

What this replaces

This is exactly what BI/OLAP tools expose as click-to-explore features once data sits on top of a proper data warehouse with a star schema (Sternschema): slice, dice, drill-down, and roll-up controls instead of a request ticket for a new report every time someone has a new question.

For a company, the practical implication is concrete: once delivery, order, and production data is modeled as a proper cube on a star schema, the owner can slice by customer, dice by warehouse and month, and drill from "total late deliveries" straight down to the one order causing it — without asking anyone to write a new report each time. The investment isn't in a fancier query. It's in modeling the data as a cube once, so that every future question becomes just a different way of looking at it.

Nguyễn Hải Minh

Nguyễn Hải Minh

I build custom software and data solutions for manufacturing ERP systems, including INFOR, for clients in Germany. As a Staatlich geprüfter IT-Techniker (Fachrichtung Informatik) and Informationselektroniker, I combine deep technical skill with business-systems thinking to help manufacturers automate operations and optimize cross-border import and export.

More about the author →
Model the process before you automate it — a real example with EPK, XOR and AND
ContactLiên hệ
Send a messageGửi tin nhắn