internalsGet Pro

Module 05 · Lesson 10 of 12Pro

Metrics and semantic layers: one definition each

Level
Intermediate
Topic
Data modeling for analytics
Reading time
16 min

When you finish this page you can

  1. Write a metric definition with its parts: name, owner, formula, filter, time column and the dimensions it may be grouped by.
  2. Give two different calculations two different names, instead of arguing over which one is revenue.
  3. Compute ratio metrics from summed parts at the grain a reader asks for, never as an average of averages.
  4. Decide whether a metric belongs in a view, a BI tool or a semantic layer, and when to move it.

Builds on 3 lessons

Start with lesson 113 min
  1. Why data modeling matters for analytics13 min
  2. Dimensional modeling: facts and dimensions17 min
  3. Grain: deciding what one row means16 min

Three revenues from one clean model

is an online store in India. Every night Meera, its data engineer, loads about 60,000 orders and 10 million click events from the store’s PostgreSQL read replica into a file on one 8 GB server. Daniel, who leads finance reporting, reads the numbers at 07:00.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan