🗄️Grain
Also known as Fact Table Grain, Table Grain, Granularity
What one row of a table stands for, such as one sale or one day.
Think of it like
It is like slicing bread. Thin slices can be stacked up, but a thick slice cannot be made thin again.
Example
A table with one row per receipt can say how much each visit spent. Only a table with one row per item can say which product sold.
Why it matters
A wrong grain gives wrong totals. Mixing two grains in one table counts some sales twice.
Definition
Common mistake
Key takeaways
- 1Decide it first. Pick the grain before the columns.
- 2One per table. Never mix two grains.
- 3Finer answers more. Rows can be summed, not split.