Define statistical metrics
The requirements analysis document contains atomic and derived metrics. You must define these metrics before you design the summary layer table model.
Metric definition notes
An atomic metric defines a clear statistical scope 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 the business process is defined. You can create derived metrics after you understand the specific report requirements. You must create an atomic metric before you create a derived metric. Note the following:
-
Atomic metrics, modifier types, and modifiers belong to a business process. A modifier inherits the data domain from its modifier type.
-
A derived metric can have multiple modifiers, depending on its specific semantics. For example, if payment amount is an atomic metric, then the payment amount for product A in the last month is a derived metric. The period is last month, the modifier is product A, and the atomic metric is payment amount.
-
A derived metric belongs to only one atomic metric. It inherits the data domain from the atomic metric, not from the modifier.
Determine metrics based on business requirements
In this tutorial, a data analyst for an e-commerce marketing department needs data for marketing analysis. The requirements include the total sales of kitchenware products by province for the last day, the names of the top 10 selling products in that category, and the distribution of user purchasing power by province (per capita spending).
Based on the previous analysis, the business process is confirm receipt (successful transaction), and the measure is the product sales amount. Therefore, you can define the atomic metric as: successful product transaction amount.
The derived metrics are:
-
Total sales of each kitchenware product by province for the last day
-
Per capita spending on kitchenware products by province for the last day (total spending divided by the number of users)
To find the top 10 selling products in the category, you can sort the total sales of each kitchenware product for the last day in descending order and select the names of the top 10 products.