All Products
Search
Document Center

Quick BI:Activity Compare Control

Last Updated:Apr 26, 2024

As a query control, the activity comparison control supports the analysis and display of individual activities and comparison activities. This topic describes how to use the Activity Compare control.

Scenario

When analyzing promotion activities, you can directly select an activity, a date, and compare activities and compare dates. For example, when the company analyzes this year's Double 11 activities, it selects last year's Double 11 activities for comparison activities and displays data through associated charts.

Limits

The associated chart configuration items supports only five types of charts: kanban, metric card trend chart, ranking, cross table, and detail table.

Prerequisites

Create an activity dataset. You can prepare different field content for the activity dataset based on the actual situation. Includes basic activity datasets and high-order activity datasets. In this example, the following dataset fields are used. You can specify the field names.

Basic activity dataset

Field

Field Description /Business Scenario

Description

camp_id

The ID of the current activity.

Required

camp_name

The name of the event, such as the 2022 Double 11 promotion.

Required

camp_start_time

The start time of the activity, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity started at an hour).

Required

camp_end_time

The end time of the activity, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity started at an hour).

Required

High-order activity dataset

Field

Field Description /Business Scenario

Description

camp_id

The ID of the current activity.

Required

camp_name

The name of the event, such as the 2022 Double 11 promotion.

Required

camp_start_time

The start time of the activity, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity started at an hour).

Required

camp_end_time

The end time of the activity, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity started at an hour).

Required

warmup_start_time

The start time of the warm-up phase. You can configure multiple phases, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity starts from a certain hour).

No

warmup_end_time

The end time of the warm-up phase, such as YYYYMMDD or YYYYMMDD HH:00:00 (if the activity started from a certain hour).

No

camp_level

Activity level, which can be used as an activity filter.

No

priority

The priority is related to the default value. When multiple activities are in progress at the same time today, the priority can be used to control which activity is displayed by default. By default, the activity with a large value is displayed.

No

Note

The ID type field in the active dataset. We recommend that you use the dimension type. Otherwise, the field cannot be identified.

Entry point

Entry 1: Query the empty state of a control

  1. On the page of the created dashboard, click Query Control.

  2. Click Add Activity Comparison Control in the Query Control section to go to the configuration dialog box.

    image.png

Entry 2: The query control is not in the empty state.

  1. In the query control of the configuration drop-down list, move the pointer over the icon in the upper-right cornerimage.

  2. Click Add Activity Comparison Control to go to the configuration dialog box.

    image.png

Description

After you go to the Settings tab, configure the Basic Information, Options, and Associated Charts sections.

image

The following section describes the configuration items and the corresponding renderings. For more information, see Procedure.

Parameter

Configure renderings

I. Basic information

  • Control Type: Select a single activity or select a comparison activity. You can select a single day or a daily range for the comparison activity.

  • Display Name: the name of the event.

  • Single Activity Selection image.png

  • Compare Activity Selection

    • Single-day filtering

      image.png

    • Day Range Filter

      image.png

2. Configure options

  • Source: You can select a dataset from which you want to create a dataset, create a dataset, and upload a local file.

    Note

    You must configure the active dataset in advance. If you do not understand the field composition of the active dataset, you can download the template and replace it with your own data based on the example.

image.png

  • Activity Options: Select the Activity Name and Activity ID fields. The default value of the Time Granularity parameter is YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYALLY. You can select a single day or a day range for the Filter Method parameter.

image.png

  • Activity Stage: You can specify the Time Range of the activity stage. You can add multiple activity stages.

image.png

  • Activity Default Value: You can select None, Default Recent Activity, or Manual.

  • Default Recent Activity

    image.png

  • Manual Settings

    image.png

  • Activity Filter: By default, this parameter is disabled. After you enable this parameter, you can specify Filter Content, Fields, and Control Type.

2.gif

  • Comparison Activity Cascade: You can set Comparison Activity Cascade only when the control type is set to Comparison Activity Selection. You can use configuration items to bind two comparison activities.

3.gif

3. Associated charts

  • Associated Chart: You can associate charts in this section. Select Target Chart and Active Stage Field.

After you select the content of the current activity, the content is automatically associated with the selected content.

image.png

Procedure

I. Basic information

In the Basic Information section, set the Control Type parameter. If you select Select Single Activity, set the Display Name parameter. In this example, select Select Compare Activity. In this example, set the Display Name parameter.

image

2. Configure options

After you configure the basic information of the widget, set Option Value Source, Activity Options, Activity Phase, Activity Default Value, Activity Filter, and Compare Activity Cascade in the Options section.

  1. You can click Download Template on the right side to Upload Local File. You can also select an existing dataset from the drop-down list.

    image

  2. After you select an option value source, you must configure the Activity Options parameter. Set Activity Name to the Activity Name field and Activity ID to the Current Activity ID field. The Time Granularity parameter is set to Year, Month, and Day by default. You can set the Filter Method parameter to Single Day or Day Range.

    image.png

    1. If you set the Filter Method parameter to Single Day, you can filter the time of a single day.

      image.png

    2. If you set the Filter Method parameter to Day Range, you can set the Filter Method parameter to Day Range.

      image.png

  3. In addition to the activity content configuration, you also need to set the activity phase. You can enter the calendar display text as Formal, and select Formal Period Start Time and Formal Period End Time for the Time Range field. You can also add more segments, such as the warm-up period and pre-sale period.

    image

  4. You can set Default Values for the configured activities, including None, Default Recent Activities, and Manual Settings. If you select Default Recent Activity, set the Activity Priority parameter to Activity Level.

    Note

    If multiple activities with the same priority exist, the activity IDs are used in ascending order. If multiple activities with the same priority 9 exist at the same time, the activity with the activity ID 1 is selected first, but the activities with the activity IDs 5 and 7 are not.

    1. Default Latest Activity

      image

    2. Manual Settings

      If the filter mode of the activity option is set to Single Day in the option configuration, you can configure the default date for the current activity and the comparison activity.

      image.png

      If you set the Filter By parameter to Day Range, you can specify the default date range for the current activity and the comparison activity.

      image.png

  5. By default, the activity filter feature is disabled. To filter activities, click Enable, enter Activity Level in the Filter Content field, select Activity Level, and set Control Type to Single Choice. If you want to create multiple filters, you can add filters.

    image

  6. Compare Activity Cascade is supported only when the Control Type parameter is set to Compare Activity Selection. By default, this feature is disabled. If you want to use a configuration items to bind two comparison activities and the corresponding comparison date, you can enable this feature. The following table lists the options.

    1. Activity Cascade

      image.png

    2. Date cascade (optional)

      If you set the Filter By parameter to Single Day, you can configure the Current Date and Compare Date parameters.

      image.png

      If you set the Filter Method to Day Range, you must configure the Current Start Time and Comparison Start Time cascades and the Current End Time and Comparison End Time cascades.

      image.png

3. Associated charts

After you configure the basic information and options, you can associate charts in the Associated Charts section. You can select a chart for which you want the activity control to take effect. You can select the Date (day) field for the activity phase.

Note

You can associate five types of charts: kanban, Indicator Card Trend, Ranking, Cross Table, and Details.

image.png

  • The following figure shows the results of association in cross tables and detail tables. In this example, single-day filtering is performed. 关联图表1

  • The following figure shows the correlation between the kanban and the leaderboard. In this example, the day range is used. 5.gif

On the Analysis tab of the chart, click the Advanced tab. In the Advanced Settings section, configure the comparison settings for the activity.

image.png

Parameter/Option

Compare Name

Custom comparison names are supported.

Display Content

  • You can set Difference Percentage, Difference, and Original Value for cross tables and details tables.

  • Percentage Difference and Percentage Difference are supported for kanban, card trend charts, and rankings.

If the data of the previous period is negative

If Percentage Difference is displayed, you can select a formula to calculate the difference percentage when the previous period data is negative. The formula that you select takes effect only when the data of the previous period is less than 0. image.png

regular time comparison

You can select Comparison Date and select a single comparison metric to set the comparison content. You can synchronize comparison metrics.

image.png

Note

This configuration items is supported for kanban, metric card trend charts, cross tables, and detail tables.

Display Position

You can set Metric Right, Independent Right, and Metric Bottom for cross tables and detailed tables.

Display Style

Cross tables and details tables can be set to red for positive numbers and green for negative numbers or green for positive numbers and red for negative numbers.

image.png

Select a mark

kanban and indicator card trend charts support selection of up and down markers.

image.png

Set the secondary indicator font style

You can set the secondary indicator font style for the kanban and card trend charts.

image.png

Secondary Indicator Position

You can set the Secondary Indicator Position parameter for the metric trend chart.

image.png

Use control effects

The comparison control is configured as described in the preceding steps and is associated with five charts. You can select the current activity content and comparison activity content to be compared, and view the data such as order amount and price activity comparison in the corresponding area in the associated chart.

image