Data & AI glossary
Fact table
A table that records measurable events, one row per sale, per order or per click, with their amounts and quantities.
IN PRACTICE
One row per measured event.
It contains measures (amount, quantity, cost) and keys that point to the dimensions: which product, which store, which day, which customer. It is what you add up, count and average. In a star schema, it sits at the centre.
Its key notion is the grain: what exactly a row represents. On an e-commerce site, it can be an order, or an item within an order. The choice changes every calculation that follows.
The trap: mixing grains. If the table has one row per ordered item and the order’s shipping costs are repeated on every row, summing them counts them several times. Many gaps between dashboards come from there. The grain is written in the documentation, and a test checks that each row is unique.
GO FURTHER
Read next.
WHAT COMES NEXT, WE BUILD TOGETHER
Your next project
starts with a conversation.
An idea, a pain point, a project to kick off? Let’s talk about what would make a difference for your teams.
Let’s talk about your project