Create derived metrics and composite metrics

更新时间: 2026-06-04 18:55:40

Add derived and composite metrics to a logical aggregate table. A derived metric combines a statistical period, atomic metric, business filters, and granularity. A composite metric applies calculation logic across derived metrics — for example, Conversion rate in the last 30 days = Number of buyers in the last 30 days / Number of visitors in the last 30 days.

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 and, in Dev-Prod mode, an environment.

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

  4. Click a 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. 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 and, in Dev-Prod mode, an environment.

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

  4. Click a 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 these steps.

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

      Parameter

      Description

      English Name

      The English name of the metric. Requirements:

      • Allows letters, digits, and underscores (_).

      • Maximum: 64 characters.

      Metric Name

      The name of the metric. Requirements:

      • Allows Chinese characters, letters, digits, underscores (_), and hyphens (-).

      • Maximum: 54 characters.

      Data Domain

      The subject area of the composite metric.

      Metric Definition

      A natural-language description of the metric's processing logic. Example: Average transaction value in the last month = Total sales in the last month/Total orders in the last month. Enter @ or click Reference Metric to reference derived metrics in the logical aggregate table. Maximum: 1000 characters.

      Statistical Period

      The statistical period for the composite metric. If the required period is unavailable, create one in the common business logic module. Create a statistical period.

      Atomic Metric

      The atomic metric for the composite metric.

      Business Condition

      The business filter for the composite metric.

    2. Click Next.

    3. On the Composite Calculation Logic page, edit the calculation logic and preview the results.

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

      Parameter

      Description

      Data Type

      The data type of the composite metric. Available types depend on the compute engine.

      Measurement Unit

      The measurement unit of the composite metric. Supported categories:

      • 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

      The owner of the composite metric.

      Description

      A brief description of the composite metric. Maximum: 1000 characters.

  7. Click Submit, enter your comments in the Submit Comments dialog box, and click OK And Submit.

    In Dev-Prod mode, publish the metric to production. Manage publishing tasks.

What to do next

After submitting metrics, manage the logical aggregate table in the Operation Center.

上一篇: Create a logical aggregate table 下一篇: Create registered metrics
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈