Define statistical metrics

更新时间:
复制 MD 格式

The output document from requirements gathering includes atomic metrics and derived metrics. Complete metric design before designing the aggregated layer table model.

Guidelines for defining metrics

An atomic metric has a clear statistical definition and calculation logic: atomic metric = business process + measure. A derived metric is a common statistical metric: derived metric = period + modifier + atomic metric. You can create atomic metrics only after defining the business process. You can create derived metrics after understanding specific report requirements, and you must always create the corresponding atomic metric first. Note the following:
  • Atomic metrics, modifier types, and modifiers belong directly under a business process. Modifiers inherit the data domain of their modifier type.
  • A derived metric can include multiple modifiers, based on its semantics. For example, if "payment amount" is an atomic metric, then "payment amount for Product A over the last month" (period: last month, modifier: Product A, atomic metric: payment amount) is a derived metric.
  • A derived metric belongs to exactly one atomic metric and inherits its data domain, regardless of the modifier's data domain.

Determine metrics based on business needs

In this tutorial, you are a marketing data analyst in an E-commerce marketing department. Your data needs include the following: total sales by province for cookware-category products over the last day, names of the top 10 best-selling products in that category, and user purchasing power distribution by province (average spending per person)—all for marketing analysis.

Based on prior analysis, the business process is confirmed as order confirmation (successful transaction), and the measure is product sales amount. Therefore, define the atomic metric: successful transaction amount for products.

Derived metrics include the following:
  • Total sales by product in the cookware category across all provinces over the last day
  • Per capita spending on kitchenware province-wide over the past day (total spending divided by the number of people)
You can sort total sales by product in the cookware category across all provinces over the last day in descending order and take the top 10 to obtain the names of the top 10 best-selling products in that category.