All Products
Search
Document Center

Dataphin:Create derived metrics and composite metrics

Last Updated:May 28, 2025

Derived metrics consist primarily of statistical periods, atomic metrics, business filters, and statistic granularity. Composite metrics are created by combining various calculation logic based on derived metrics. For example, the composite metric Conversion rate in the last 30 days (Number of buyers in the last 30 days/Number of visitors in the last 30 days) is calculated based on the derived metrics Number of visitors in the last 30 days and Number of buyers in the last 30 days. This topic describes how to add derived metrics and composite metrics to a logical aggregate table.

Create a derived metric

  1. On the Dataphin homepage, click Develop in the top navigation bar. The data Development page appears by default.

  2. In the top navigation bar, select a project (In Dev-Prod mode, you need to select an environment).

  3. In the left-side navigation pane, choose Modeling > Logical Summary Table.

  4. In the logical aggregate table list, click the target logical aggregate table. On the Logical Summary Table page, click the Derived Metric tab.

  5. On the Derived Metric tab, click Create Derived Metric.

  6. On the Create Derived Metric page, configure the parameters. For more information, see Create a derived metric.

Create a composite metric

  1. On the Dataphin homepage, click Develop in the top navigation bar. The data Development page appears by default.

  2. In the top navigation bar, select a project (In Dev-Prod mode, you need to select an environment).

  3. In the left-side navigation pane, choose Modeling > Logical Summary Table.

  4. In the logical aggregate table list, click the target logical aggregate table. On the Logical Summary Table page, click the Composite Metric tab.

  5. On the Composite Metric tab, click Create Composite Metric.

  6. On the Create Composite Metric wizard page, complete the following operations.

    1. On the Define Composite Metric page, configure the parameters.

      Parameter

      Description

      English Name

      Enter the English name of the metric. The name must meet the following requirements:

      • It can contain letters, digits, or underscores (_).

      • It cannot exceed 64 characters.

      Metric Name

      Enter the name of the metric. The name must meet the following requirements:

      • It can contain Chinese characters, letters, digits, underscores (_), or hyphens (-).

      • It cannot exceed 54 characters.

      Data Domain

      Select the subject area to which the composite metric belongs.

      Metric Definition

      Enter the metric definition, which describes the definition and processing logic of the metric in natural language to help business users understand the metric processing logic. For example: Average transaction value in the last month = Total sales in the last month/Total orders in the last month. During this process, you can enter @ or click Reference Metric to select derived metrics in the logical aggregate table to build the calculation expression. The metric definition cannot exceed 1000 characters.

      Statistical Period

      Select the statistical period for the composite metric. If the required statistical period is not available, you can create one in the common business logic module. For more information, see Create a statistical period.

      Atomic Metric

      Select the atomic metric used to define the composite metric.

      Business Condition

      Select the business filter used to define the composite metric.

    2. Click Next.

    3. On the Composite Calculation Logic page, edit the calculation logic of the composite metric and preview the data to view the results.

    4. On the Complete Metric Information page, configure the parameters.

      Parameter

      Description

      Data Type

      Select the data type of the composite metric. The supported data types vary depending on the compute engine. The specific types are displayed on the interface.

      Measurement Unit

      Select the measurement unit of the composite metric. Supported units include currency units, time units, ratio units, rankings, object quantifiers, weight units, and others.

      • Currency Units: Cent (CNY), Yuan (CNY), 10,000 Yuan (CNY), Million Yuan (CNY), 10 Million Yuan (CNY), 100 Million Yuan (CNY), Cent (USD), Dollar (USD), Euro (EUR), Dollar (HKD).

      • Time Units: Day, Month, Week, Year, Hour, Minute, Second, Quarter, Millisecond.

      • Ratio Units: Decimal, Percentage, Per mille.

      • Rankings: Ranking (position).

      • Object Quantifiers: Household, Transaction, Item, Piece, Time, Person-day, Company, Hand, Sheet, Package.

      • Weight Units: Ton, Kilogram.

      • Others: Others.

      Owner

      Select the owner of the composite metric.

      Description

      Enter a brief description of the composite metric, within 1000 characters.

  7. After you complete the configuration, click Submit. In the Submit Comments dialog box, enter your comments and click OK And Submit.

    If the project is in Dev-Prod mode, you need to publish the derived metric to the production environment. For more information, see Manage publishing tasks.

What to do next

After you add and submit derived metrics or composite metrics to a logical aggregate table, you can go to the Operation Center to manage the logical aggregate table. For more information, see Operation Center.