All Products
Search
Document Center

Quick BI:Add Data Comparison

Last Updated:May 22, 2024

This topic describes how to add data comparison for a measure field.

Prerequisites

A line chart that contains only one date field is created. For more information, see Line charts.

Limits

  • Only line charts support the data comparison feature.

  • You can use the data comparison feature when you specify only one field for Value Axis (Mea.).

  • You can use the data comparison feature when you specify only one field for Category Axis (Dim.).

  • After the data comparison feature is enabled, you can only view the data comparison results on the mobile terminal. You cannot change the comparison items.

  • The data comparison feature is not supported if one of the following features is enabled for a line chart: circling, prediction, exception detection, and fluctuation analysis.

Background information

The following table describes the data comparison feature for different date field types.

Date Field Type

Example

Data comparison description

Year (in the format of yyyy)

Order Date (year)

  • Last year: Compares data between this year and last year, such as 2021 and 2020.

  • Custom end date: Compares data between this year and a custom end year, such as 2021 and 2009.

Quarter (in the format of yyyyqq)

Order Date (quarter)

  • Same period last year: Compares data between this quarter and the same quarter last year, such as the first quarter of 2021 and 2020.

  • Last quarter: Compares data between this quarter and last quarter, such as the first quarter of 2021 and the fourth quarter of 2020.

  • Custom end date: Compares data between this quarter and a custom end quarter, such as the first quarter of 2021 and the third quarter of 2020.

Month (in the format of yyyymm)

Order Date (month)

  • Same period last year: Compares data between this month and the same month last year, such as January 2021 and January 2020.

  • Last month: Compares data between this month and last month, such as January 2021 and December 2020.

  • Custom end date: Compares data between this month and a custom end month, such as January 2021 and April 2020.

Week (in the format of yyyy-ww)

Order Date (week)

  • Same period last year: Compares data between this week and the same week last year, such as the second week in 2021 and the second week in 2020.

  • Last week: Compares data between this week and last week, such as the second week and the first week in 2021.

  • Custom end date: Compares data between this week and a custom end week, such as the second week in 2021 and the seventeenth week in 2020.

Day (in the format of yyyymmdd)

Order Date (day)

  • Same period last year: Compares data between today and the same day last year, such as January 13, 2021 and January 13, 2020.

  • Same period last month: Compares data between today and the same day last month, such as January 13, 2021 and December 13, 2020.

  • Same period last week: Compares data between today and the same day last week, such as January 13, 2021 and January 6, 2021.

  • Last day: Compares data between today and yesterday, such as January 13, 2021 and January 12, 2021.

  • Custom end date: Compares data between today and a custom end date, such as January 13, 2021 and June 21, 2021.

Hour (in the format of hh), Minute (in the format of hh:mm), Second (in the format of hh:mm:ss), and date field in the format of yyyymmdd hh:mm:ss

Order Date (day),

order date (minute), order date (second),

Order Date (ymdhms)

Data comparison cannot be configured.

The effect diagram is as follows. image

Example of configuring data comparison

report_date(day)

The following steps are performed in a line chart:

  1. Go to the dashboard edit page. For more information, see Create a dashboard.

  2. On the Fields tab of the Data panel, add dimensions and measures.

    • In the Dimensions list, double-click order_date (day). You can also drag this dimension to Category Axis (Dimensions).

    • In the Measures list, double-click order_amt. You can also drag this measure to Value Axis (Mea.).

  3. Click the Analysis tab. In the Advanced Settings section, configure Add Data Comparison.

    By referring to this example, set the data comparison of the measure field order amount as the same period last year, the same period last month, the same period last week, the previous day, and the optional end date. image

  4. The chart is automatically updated based on the configured data comparison.

    image

report_date(month)

The following steps are performed in a line chart:

  1. Go to the dashboard edit page. For more information, see Create a dashboard.

  2. On the Fields tab of the Data panel, add dimensions and measures.

    • In the Dimensions list, double-click order_date (month). You can also drag this dimension to Category Axis (Dimensions).

    • In the Measures list, double-click order_amt. You can also drag this measure to Value Axis (Mea.).

  3. Click the Analysis tab. In the Advanced Settings section, configure Add Data Comparison.

    Refer to this example to set the data comparison of the measurement field order amount as the same period last year, the previous month, and the optional end date. image

  4. The chart is automatically updated based on the configured data comparison. The effect is as follows.

    image

report_date(quarter)

The following steps are performed in a line chart:

  1. Go to the dashboard edit page. For more information, see Create a dashboard.

  2. On the Fields tab of the Data panel, add dimensions and measures.

    • In the Dimensions list, double-click order_date (quarter). You can also drag this dimension to Category Axis (Dimension).

    • In the Measures list, double-click orderamt. You can also drag orderamt to Value Axis (Mea.).

  3. Click the Analysis tab. In the Advanced Settings section, configure Add Data Comparison.

    Refer to this example to set the data comparison of the measurement field order amount to the same period last year, the previous quarter, and the optional end date. image

  4. The chart is automatically updated based on the configured data comparison. The effect is as follows.

    image

report_date(year)

The following steps are performed in a line chart:

  1. Go to the dashboard edit page. For more information, see Create a dashboard.

  2. On the Fields tab of the Data panel, add dimensions and measures.

    • In the Dimensions list, double-click order_date (year). You can also drag this dimension to Category Axis (Dimensions).

    • In the Measures list, double-click orderamt. You can also drag orderamt to Value Axis (Mea.).

  3. Click the Analysis tab. In the Advanced Settings section, configure Add Data Comparison.

    Refer to this example to set the data comparison of the measurement field order amount to the same period last year and the optional end date. image

  4. The chart is automatically updated based on the configured data comparison. The effect is as follows. image