Metrics, dimensions and grain

How to define a metric precisely and avoid counting the wrong thing.

Notes

A metric needs a numerator, a denominator, a time window and a population.

Grain means what one row in a table represents (one order, one customer, one day). Most wrong numbers come from mixing grains.

Key points

  • Write the metric definition in one sentence.
  • Know the grain of every table before joining.
  • Count distinct people when you mean people.