Managing Derived Metrics


Derived metrics can be defined based on raw metrics in Metric Management, and operations such as editing and publishing can be performed on derived metrics.

Prerequisites


Before you start, ensure the following:

  • The current account has been assigned a menu group containing Metric Library. If not assigned, contact the application administrator.
  • The current standard metric library already contains the required raw metrics, or the required raw metrics are already created.
  • The required dimension tables have been created and published.

Creating a Derived Metric


  1. Select Metric Library in the left navigation bar, which goes to the Raw Metric tab by default.

  2. Select the Derived Metric tab, select New, and enter the following information on the New Derived Metric page:

    • Metric Type: Select Single-Valued or Multi-Valued, which cannot be changed once created.

      • Single-Valued Metric: A metric with only one fixed value corresponding to it. For example, the amount of power generated by a device on a given day.
      • Multi-Valued Metric: A metric with more than one value corresponding to it. For example, the amount of electricity generated by a device per day.
    • Associated Raw Metric: In the drop-down box, select the raw metrics in the built-in Standard Metric library, or select the raw metric in the created metric library to define the calculation logic of the metric. If the current raw metric library does not meet your needs, you can also select Create Raw Metric. For more information, see Creating a Raw Metric.

    • Statistical Dimension: Select a published dimension table in the drop-down box to define the statistical dimension of the derived metric. If the derived metric does not need to be counted by dimension, select ALL.

    • Period: Select the statistical period of the metric in the drop-down box.

      • When the metric type is multi-valued, historical data within a set period of time will be statistically calculated with the aggregator function according to the selected frequency, and multiple values will be returned. For example, if a device continuously sends data, the statistical period is set to Week, and the metric aggregator function is SUM, if the time range is set to December 1, 2022 - December 14, 2022, the system will use the SUM function to aggregate data from 1 to 7 and the data from 8 to 14 and return 2 values.
      • When the metric type is single-valued, the system will calculate the data within the period using the aggregator function and return a value. For example, if a device continuous sends data, the statistical period is set to Today, and the metric aggregator function is MAX, then when the metric is called, the system will find the maximum data of the day and return it.


      We will use June 23, 2022 as an example to illustrate the period options.

      Period Meaning Example
      This Day Today’s date. June 23, 2022.
      Week To Date From every Monday to today. June 20, 2022 - June 23, 2022.
      Month To Date From the 1st of each month to the current day. June 1, 2022 - June 23, 2022.
      This Month From the 1st of each month to the last day of each month. (For metrics such as planned generation and predicted power, future data needs to be calculated.) June 1, 2022 - June 30, 2022.
      Year To Date From January 1st to the current day of each year. January 1, 2022 - June 23, 2022.
      This Year From January 1st to the last day of each year. (For metrics such as planned generation and predicted power, future data needs to be calculated.) January 1, 2022 - December 31, 2022.
      Beginning Of Life From data generation to the present. If data is entered in the system on June 1, 2019, the period is from June 1, 2019 - June 23, 2022.
      Custom Time Range Date value within the set time range. Calculates the data value within the time range.
      Latest Latest data values. Calculates the latest data value at the current moment.


    • Metric Aggregator: The aggregator function is automatically generated by the configuration of the associated raw metric.

    • Unit: Select the unit of calculation for the derived metric.

    • Data Type: Select the data type for the derived metric.

    • Derived Metric ID: Customize the derived metric ID, or Autogenerate the derived metric ID by default. This cannot be modified after creation.

    • Derived Metric Name: Customize the derived metric name, or Autogenerate the derived metric name by default.

    • Description: Enter an additional description for the derived metric.

    • Attributes: Select Add Attributes and enter the key-value pair of the attribute to add other attributes to marking or differentiation. For example, the domain to which the metric belongs.

  3. Select Publish to save and publish the derived metric.

    If you do not want to publish it for the moment, select Save to save it as a draft. To publish it later, see Publishing a Derived Metric.


After saving or publishing a derived metric, it can be viewed in the list on the Derived Metric tab.

Editing a Derived Metric


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Select Edit edit_icon at the end of the target derived metric row and save or publish the changes.

Deleting a Derived Metric


To delete a derived metric, ensure that the query mapping group of the derived metric is deleted in advance.


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Select Delete delete_icon after hovering over the ellipsis (…) at the end of the target derived metric row.

Publishing a Derived Metric


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Derived metrics can be published in the following two ways:
    • Select Publish publish_icon at the end of the target derived metric row.
    • Check multiple derived metrics to publish, and then select Publish publish_2_icon at the top of the page to publish derived metrics in batches.

Query mapping groups can only be configured on the Query Mapping tab after the derived metrics are published.

Unpublishing a Derived Metric


To unpublish a derived metric, ensure that the query mapping group configured for the derived metric is deleted in advance. For more information, see Deleting a Query Mapping Group.


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Hover the mouse over the ellipsis (…) at the end of the target derived metric row and select Unpublish unpublish_icon to unpublish the derived metric.

Viewing an Online Version of a Derived Metric


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Hover the mouse over the ellipsis (…) at the end of the target derived metric row for which the status is Updated for Publish, and then select View Online Version view_version_icon to view the derived metric in its most recently modified version.

Reverting a Derived Metric to an Online Version


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Hover the mouse over the ellipsis (…) at the end of the target derived metric row for which the status is Updated for Publish, and then select Revert to Online Version revert_version_icon to republish the previous derived metric.

Exporting/Importing Derived Metrics


Export/import operations are available to share and migrate derived metrics between different OUs.


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Check the derived metrics, then select Export to export a file in JSON format as a template.
  3. Select Import to import the local derived metrics.


After the derived metrics are successfully imported, the following situations will occur:

  • If the imported derived metric ID does not exist in the current metric list, the compound metric will be added to the metric list an automatically published. The status of the derived metric will be changed to Draft.
  • If the imported derived metric ID already exists in the current metric list, and the current metric is in the Draft or Unpublished status, the field value of the imported derived metric will overwrite the field values of the same ID in the list, the metric will be automatically published and the status will change to Draft.
  • If the imported derived metric ID already exists in the current metric list, and the current metric is in the Updated for Publish or Published status, the field values of the imported derived metric will overwrite the field values except for Metric Type of the same ID, and the metric will be automatically published, and the status will be changed to Draft.

Insighting a Derived Metric


To view the value of a derived metric on the Metric Insights page, ensure that the derived metric is published in advance.


  1. Select Metric Library in the left navigation bar and go to the Derived Metric tab.
  2. Select Metric Insights insight_icon at the end of the target derived metric row for quickly insight the derived metric value.