All Products
Search
Document Center

DataWorks:Derived metrics

Last Updated:Mar 27, 2026

A derived metric measures a specific business activity over a set period and within a target scope — for example, the total sales amount in Shanghai over the last week. By combining an atomic metric, a period, and one or more modifiers into a single reusable definition, derived metrics standardize how business KPIs are calculated across all downstream tables and reports.

This topic describes how to create derived metrics (individually or in batch) and how to manage versions, view associated tables, and export or delete them.

Prerequisites

Before you begin, ensure that you have:

  • An atomic metric — defines the calculation logic for a statistical value

  • A modifier — defines the business scope for a statistical value

  • A period — defines the time range for a statistical value

  • A dimension table — defines the analytical dimensions for the business activity

  • A data warehouse layer — use the Data Warehouse Summary (DWS) layer for the Common Layer or the Application Data Service (ADS) layer for the Application Layer

  • (Optional) A data domain or business process — required when creating derived metrics in the DWS layer, to categorize business data

  • (Optional) A data mart or subject area — required when creating derived metrics in the ADS layer, to categorize data for a specific scenario or product

How it works

A derived metric is built from three components: an atomic metric, a period, and one or more modifiers. Each derived metric is uniquely associated with one atomic metric and reflects that metric's value within a specific time and business context.

image
Component Role Example
Atomic metric Defines the business definition and calculation logic Total number of orders
Period Defines the time range for the statistics Calendar day, last 7 days
Modifier Narrows the business scope. A derived metric can include one or more modifiers Online grocery stores, offline grocery stores
Derived metric Combines all three components to measure business performance under specific conditions Total number of orders from online grocery stores within a single calendar day

Example: With atomic metric total number of orders, period calendar day, and modifier online grocery stores, the system generates a derived metric representing the *total number of orders from online grocery stores within a single calendar day*. Add a second modifier offline grocery stores to also generate *total number of orders from both online and offline grocery stores within a single calendar day* — both from a single model-building step.

Open the Derived Metric page

  1. Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and O\&M > Data Modeling. Select the desired workspace from the drop-down list and click Go to Data Modeling.

  2. On the Data Modeling page, click Data Metrics in the top navigation bar to open the Derived Metric page.

From this page, create derived metrics in the Common Layer or Application Layer — either one at a time or in batch.

Use batch creation when you need to generate multiple derived metrics for the same business activity across different time frames and scopes. For details, see Create multiple derived metrics and Create a single derived metric.

Create multiple derived metrics

Use this approach when you need to generate a set of derived metrics from the same atomic metric with different period and modifier combinations.

  1. On the Derived Metric page, hover over the 新建 icon and click Multiple Derived Metrics.

  2. Build the derived metric model.

    1. In the left pane of the canvas, select the Atomic Metric, Period, and Modifier components for your derived metrics. > Note: Each derived metric requires exactly one Atomic Metric and one Period, plus one or more Modifier components. If no existing component meets your needs, click Create to add one.

    2. In the right pane, a tree shows the derived metrics that will be generated. Each metric appears with a status icon:

      • 派生指标状态 | The derived metric does not exist and will be created

      • 成功 | The derived metric already exists and will be skipped

      • 已创建状态 | Copies the current metric

    3. Use the toolbar in the upper-right corner of the canvas to zoom in, zoom out, center the view, or switch to full-screen mode.

    4. Click Generate Derived Metrics.

  3. Configure and generate the derived metrics.

    1. In the Generate Derived Metrics dialog box, select the data layer (Common Layer or Application Layer) and a checker to validate the naming conventions. > Note: If no checker is available, create one in the data warehouse layer. For details, see Configure a checker for a data warehouse layer.

    2. Click Next Step.

    3. Select the derived metrics to create. By default, all metrics in the model are selected.

    4. Click Create or Create and Submit: After creation, the status icon for each metric in the tree changes from 派生指标状态 to 成功.已创建状态

      • Create — creates the selected metrics. Submit each metric individually afterward from its edit page.

      • Create and Submit — creates and submits the metrics in one step. Only submitted metrics can be referenced by model tables.

  4. Find the created derived metrics in the derived metric list.

Create a single derived metric

  1. On the Derived Metric page, hover over the 新建 icon and click Derived Metric.

  2. Configure the Business Logic. Select the period, modifiers, and atomic metric based on your business requirements.

    Parameter Description
    Period The time range for the business activity statistics, such as Last Day or Last Week
    Modifier The scope constraint for the business activity statistics, such as Online or Offline
    Atomic Metric Defines the calculation logic and statistical value, such as Order Amount
  3. Configure the Basic Information. Choose between the Data Warehouse Summary (DWS) layer and the Application Data Service (ADS) layer. The available fields depend on which layer you select.

    For both Display Name and Abbreviation, click the drop-down icon next to Intelligent Recommendation to select a checker that validates the naming convention. If no checker is available, create one in the data warehouse layer. For details, see Configure a checker for a data warehouse layer.
    Parameter Description
    Data Layer The layer where the derived metric belongs: DWS or ADS
    Business Category The business category for the derived metric. Required when Data Layer is set to the DWS layer
    Business Process The type of business activity. Required when Data Layer is set to the DWS layer
    Mart/Subject The business activity category for a specific scenario or product. Required when Data Layer is set to the ADS layer
    Display Name The display name of the derived metric. Click Intelligent Recommendation to auto-generate a name in the format Period + Modifier + Atomic Metric. The button appears only after you select both an Atomic Metric and a Period
    Abbreviation An abbreviation for the derived metric. Click Intelligent Recommendation to auto-generate an abbreviation in the format Atomic Metric + Period + Modifier. The button appears only after you select both an Atomic Metric and a Period
    Name The derived metric name, in English
    Owner The owner of the derived metric. Defaults to the user who created it
    Description A description of the derived metric
  4. Click Save.

  5. Click Submit to publish the current version. Only submitted derived metrics can be referenced by model tables.

    Save the derived metric before submitting. Each submission creates a new version. A submitted version cannot be resubmitted.

Manage versions and view associated tables

On the metric editing page, use the right-side panel to manage versions or view associated tables.

Compare or roll back versions

Open Version Management in the right-side panel to view the version history.

  • Version Comparison — select two versions to compare their configurations side by side. If you select only one version, the system compares it with the currently saved content. You can compare a maximum of two versions at a time.

  • Roll Back — revert the metric to a previous version. This overwrites the editing page with the content of the selected version.

    Note

    Rolling back only updates the configuration on the editing page. To make the rollback take effect and allow model tables to reference the metric, save and then submit the metric again.

View associated tables

Open Associated Tables in the right-side panel to see which model table columns reference this metric. Click View Details next to a column to open the table details page.

Export derived metrics

Use the batch export feature to export multiple derived metrics at once.

  1. Click the image.png icon to open the derived metric list.

  2. Select the metrics to export. Skip this step if you plan to use Export All.

    • Search by keyword — enter a keyword in the search box. The search uses fuzzy matching and returns all metrics whose names contain the keyword.

    • Select manually — select the checkboxes of the desired metrics.

  3. Export the metrics using one of the following options:

    Option Description
    Export All Exports all derived metrics created in the current workspace
    Export Searched Objects Exports all metrics that match the search keyword. Search first
    Export Selected Objects Exports only the metrics you selected. Select metrics first
  4. The Derived Metric Export Status page opens automatically. When the export is complete, click Download File to save the file to your computer.

Delete or submit metrics in batch

Use the derived metric list to delete obsolete metrics or submit unsubmitted metrics in bulk.

  1. Click the image.png icon to open the derived metric list.

  2. Select the metrics. For batch submissions, only saved, unsubmitted metrics can be selected.

  3. Choose an action:

    • Batch Delete — deletes the selected metrics permanently. Deleted metrics cannot be associated with or referenced by model tables. > Note: A derived metric that is currently referenced by a model table cannot be deleted. Remove the reference first.

    • Batch Submit — submits the selected metrics so they can be associated with and referenced by model tables. This creates a new version record for each metric. For details about versions, see Manage versions and view associated tables.

What's next

After creating a derived metric, reference it in summary tables or application tables. These tables support business queries, online analytical processing (OLAP) analysis, and data distribution. For details, see Materialize a logical model.