Skip to interview prep
Apexed

19. What does the grain of a dataset mean, and why establish it before calculating a metric?

EasyAnalysis & visualization

Technical

Type or dictate your answer. Your draft is saved on this device.

Show model answer

Grain describes what one row represents, such as an order, an order line or a customer-day. The same customer or transaction can legitimately appear many times at a finer grain.

State the intended counting unit before aggregating or joining. Check candidate keys and a few sample records. A correct-looking SUM or COUNT can still answer the wrong question if the row unit differs from the business unit.

What interviewers listen for

  • Define one row
  • Check keys
  • Match aggregation to the question
What does the grain of a dataset mean, and why establish it before calculating a metric — Data & analytics interview question — Apexed