Skip to content

Metrics

Metrics are a series of standard data used to measure the business. In business analysis, the truly dynamic aspect in response to business changes lies in the flexible definition of the calculation logic for metrics. By centralizing the management of this part in the form of formulas, we can enhance the expressive power of metrics, thereby achieving the construction of a business metrics system without extensive pre-computation.

Metrics include atomic metrics and business metrics. Atomic metrics have undergone metric definition, and users select relevant business information fields from datasets based on their business scenarios when using them. Business metrics differ from atomic metrics in that, in addition to metric definition, they also configure business-related information, such as business-related dimensions, limiting conditions, and other information, which together constitute metrics representing specific business scenarios and have clear analysis scenarios.

This article provides a detailed introduction to the process of creating metrics and related operations.

Metric Creation

The creation of indicators can be divided into two parts: indicator definition and business configuration. Atomic indicators only include indicator definition, while business indicators include both indicator definition and business configuration, so business indicators can also be seen as atomic indicators + indicator configuration. Both atomic indicators and business indicators are created and managed on the Dataset -> Indicator Management page.

Metric Definition

The process of defining metrics is relatively simple. Please follow the steps below to define metrics.

  1. Click on "New Indicator" under Dataset -> Indicator Management, select the indicator type, and choose "Atomic Indicator" here.

  2. Enter the indicator editing page, fill in the indicator alias and description information.

  3. Write the function in the indicator definition area and preview the indicator data. The indicator definition process supports the use of fields, parameters, and user attributes. The indicator definition function must be an aggregation type function and supports the use of filter operations.

  4. Click to save the indicator.

The above steps complete the definition of the indicator. At this point, the indicator only contains numerical information about the indicator. The indicator in the example expresses the total revenue of all products, without distinguishing between years, products, stores, and other information.

Atomic metrics only include the metric definition, so completing the above 4 steps completes the creation of atomic metrics. Business metrics, in addition to the metric definition, also include the business configuration part.

Business Configuration of Metrics

After completing the definition of business indicators, it is necessary to configure the indicators for business purposes, adding dimension information to the indicators to give them rich business meanings, enabling analysis of specific business scenarios. Business configuration includes limiting conditions, analysis dimensions, timelines, and path attribution.

Limit Condition

Set the limit condition for the indicator to generate business indicators under specific conditions. As shown in the figure, when the limit condition is set to "Store = Pacific Department Store", the operating income specifically refers to the operating income of the Pacific Department Store.

Define Analysis Dimensions

Define the analysis dimension to bring dimension information into business indicators, forming indicators for specific business scenarios. Analysis can be performed based on these dimensions. In the example, the specified dimensions are Product ID, High-end/Low-end, and Order Date. Clicking Preview allows you to see that the business indicators carry this dimension information.

Timeline

The timeline is a method for analyzing business indicators over time. It is only supported when the analysis dimensions of the indicator include date-type dimensions. As shown in the figure, after dragging the order date into the dimensions, the timeline can select the order date and set the time method.

Tip

If there is no date type field information in the dimensions, setting the timeline is not supported. When there are multiple date type fields in the dimensions, only one date field can be selected as the timeline.

Path Attribution

Path Attribution is the process of associating interdependent indicators, allowing for the analysis of related indicators together when analyzing business scenarios, to examine the mutual influence between business indicators.

Indicator Granularity

Each business indicator requires configuration of business information such as dimensions and limiting conditions upon creation. If multiple indicators share the same configuration information, these configurations can be managed through indicator granularity.

Metric granularity is the management of related dimensions, time axes, and limiting conditions set during the definition of business metrics, all unified under a single granularity. When creating business metrics, you can directly reference the granularity corresponding to the business scenario, reducing the need to set dimensions and other information, making the creation of business metrics more convenient and efficient.

Create Granularity

The indicator granularity is created and managed in the dataset. As shown, open the dataset "Orders", enter the granularity management page, click New Granularity in the upper right corner of the page, and the granularity creation page will pop up.

Granularity requires input of three parts: dimension list, timeline, and limiting conditions. These three parts are set in the same way as when creating indicators. The timeline setting requires that the dimension list includes a date field, otherwise it cannot be set. The granularity definition process is relatively simple, and you can refer to the Dimension List, Timeline, and Limiting Conditions instructions in the indicator configuration process.

Granularity of Reference

Metrics can reference granularity, using the dimension list, timeline, and restriction conditions defined in the granularity. As shown in the figure, reference granularity on the metric editing page. After a metric references granularity, it will synchronize the restriction conditions, analysis dimensions, and timeline from the granularity, and these contents will be grayed out on the metric page, disallowing editing.

After referencing the granularity of the indicator, if the granularity information changes, such as adding or reducing dimensions, the indicator will automatically synchronize the modified granularity information.

Granularity Association Metrics

Metrics can reference granularities, and similarly, granularities can also be associated with metrics. When a metric is associated with a certain granularity, the information in the granularity will be synchronized to the metric, overwriting the previous configuration information of the metric. This has the same effect as referencing a granularity within a metric.

Tip

The function of granularity association metrics and metric reference granularity is the same, just binding the metrics and granularity in different ways.

Granularity Limitations

Granularity provides convenience to a certain extent for configuring business metrics, but it also has certain limitations. When creating business metrics, model data information can be used to obtain business scenario metrics information after multi-table joint operations. Dimensions and limiting conditions can be set by selecting fields from the main table and the secondary table. However, granularity currently only supports a single dataset, so when the configuration information for business metrics is set from multiple tables in the model, this method is not supported.

Metric Grouping

Metrics can be managed in groups. Metric creation can be grouped, supporting the selection of existing groups, and also supporting the creation of new groups on this page. When an input of a non-existent group name is detected, the system will prompt to create a new group. A metric can have 0 to multiple groups. During the metric management process, metrics can be quickly found through grouping.

Metrics Display

In Dataset -> Metric Marketplace, all metrics in the dataset are displayed, including atomic metrics and business metrics. Each metric is presented in the form of a chart. Clicking on a metric will reveal detailed information about the metric, including the metric chart, metric lineage, and metric definition information.

Metric Chart Display

Each indicator is displayed in chart form, with the default display being a KPI chart. Chart types can be switched based on business needs. Within the chart, you can set the indicator calculation method, indicator dimension information, and filtering conditions. After editing the chart, it can be set as the default display for the indicator.

Indicator Lineage

The indicator lineage page displays the upstream and downstream production relationships of the indicators.

Metric Definition Display

The indicator definition page displays the basic information of the indicator, including indicator basic information, expression, granularity information, and display format.

Metric Operations

Common operations for metrics include:

  • Create a copy: Business metrics support creating copies, and a new business metric name needs to be entered when creating a copy.

  • Rename: Business metrics support renaming.

  • Delete: Delete business metrics.

  • Modify the display format of the metric.

  • Modify the metric description (applicable only to atomic metrics).

  • Batch operations: Batch modify the display format of metrics, batch delete metrics.

Metrics Usage

Metrics can be analyzed and used in the App Creation dashboard. In charts, metrics can be dragged into measures or filters, but not into dimensions. When a metric is dragged into a measure, detailed information about the metric will be displayed in the chart's measure details.

You can also perform analysis in Metrics Analysis.

  1. After the metric is created, each edit update requires a data preview before it can be saved.
  2. One of the pain points in the previous version of metric definition was that the system would automatically format the expression and store it in the simplest standardized format. In this version, the system will store the expression in the user's original format, retaining comments and other content. Of course, if the field name or dataset name is modified, the system will automatically handle the renaming.

This feature is also supported in other application scenarios:

  • New Fields on Dataset
  • Join Conditions and Filter Conditions of Data Model
  • Row Permissions of App
  • Row Permissions of Data Connection
  • Expression Filter for New Dataset
  • New Expressions and Filters on Chart

HENGSHI SENSE Platform User Manual