Activity Comparison Control

更新时间:
复制 MD 格式

The Activity Comparison control lets you select activities and dates, then compare metrics across time periods through associated charts.

Scenario

Select an activity and date, then pick a comparison activity and date to view side-by-side metrics in associated charts. For example, compare this year's Double 11 promotion against last year's.

Limits

Associated charts support only five chart types: metric card, metric card trend chart, ranking, cross table, and detail table.

Prerequisites

Create an activity dataset with the required fields. Activity datasets are either basic or high-order. The following tables list the fields used in this example. You can customize 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

Start time of the warm-up phase. Supports multiple phases. Format: YYYYMMDD or YYYYMMDD HH:00:00.

No

warmup_end_time

End time of the warm-up phase. Format: YYYYMMDD or YYYYMMDD HH:00:00.

No

camp_level

Activity level. Can be used as an activity filter criterion.

No

priority

Priority determines the default activity when multiple activities overlap. The activity with the highest priority value displays by default.

No

Note

Set ID-type fields in the activity dataset to the dimension type. Otherwise, the system cannot identify them.

Access the control

Entry 1: Query control is empty

  1. On the dashboard edit page, click Query Control.

  2. Click Add Activity Comparison Control in the Query Control section.

    image.png

Entry 2: Query control is not empty

  1. In the query control drop-down list, hover over the icon in the upper-right corner image.

  2. Click Add Activity Comparison Control.

    image.png

Configuration overview

On the Settings tab, configure Basic Information, Options, and Associated Charts.

image

The following table describes each configuration item and its rendering. For more information, see Procedure.

Configuration

Rendering

I. Basic information

  • Control Type: Select single activity or comparison activity. For comparison activities, choose single-day or day-range filtering.

  • Display Name: the name of the activity.

  • Single Activity Selection image.png

  • Compare Activity Selection

    • Single-day filtering

      image.png

    • Day Range Filter

      image.png

2. Configure options

  • Source: Select an existing dataset, create a dataset, or upload a local file.

    Note

    Prepare an activity dataset in advance. If you are unsure about the required fields, click download the template and replace the sample data with your own.

image.png

  • Activity Options: Select the Activity Name and Activity ID fields. Time Granularity defaults to year-month-day. Set Filter Method to Single Day or Day Range.

image.png

  • Activity Stage: Specify the Time Range for each activity stage. You can add multiple stages.

image.png

  • Activity Default Value: Choose None, Default Recent Activity, or Manual.

  • Default Recent Activity

    image.png

  • Manual Settings

    image.png

  • Activity Filter: Disabled by default. After you enable it, specify Filter Content, Fields, and Control Type.

2.gif

  • Comparison Activity Cascade: Available only when the control type is Comparison Activity Selection. Enable this feature to bind two comparison activities.

3.gif

3. Associated charts

  • Associated Chart: Select Target Chart and Active Stage Field to associate charts.

After you select activity content, the chart is automatically associated with the selection.

image.png

Procedure

I. Basic information

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

image

2. Configure options

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

  1. Click Download Template to Upload Local File, or select an existing dataset from the drop-down list.

    image

  2. After selecting an option value source, configure Activity Options. Set Activity Name to the activity name field and Activity ID to the current activity ID field. Time Granularity defaults to year-month-day. Set Filter Method to Single Day or Day Range.

    image.png

    1. If Filter Method is Single Day, you can filter by a specific day.

      image.png

    2. If Filter Method is Day Range, you can filter by a date range.

      image.png

  3. Configure activity stages. Enter the calendar display text (e.g. Formal), then select Formal Period Start Time and Formal Period End Time for the Time Range. You can add more stages such as warm-up period and pre-sale period.

    image

  4. Set Default Values for activities: None, Default Recent Activities, or Manual Settings. If you select Default Recent Activity, set the Activity Priority parameter to Activity Level.

    Note

    If multiple activities share the same priority, they are sorted by activity ID in ascending order. For example, if activities with IDs 1, 5, and 7 all have priority 9, the activity with ID 1 is selected by default.

    1. Default Latest Activity

      image

    2. Manual Settings

      If Filter Method is Single Day, you can set a default date for the current and comparison activities.

      image.png

      If Filter Method is Day Range, you can set a default date range for the current and comparison activities.

      image.png

  5. Activity filtering is disabled by default. To enable it, click Enable, enter Activity Level in the Filter Content field, select Activity Level as the field, and set Control Type to Single Choice. To create multiple filters, click add filters.

    image

  6. Compare Activity Cascade is available only when Control Type is Compare Activity Selection. Disabled by default. Enable this feature to bind two comparison activities and their comparison dates.

    1. Activity Cascade

      image.png

    2. Date cascade (optional)

      If Filter Method is Single Day, configure the Current Date and Compare Date cascades.

      image.png

      If Filter Method is Day Range, configure the Current Start Time/Comparison Start Time cascade and the Current End Time/Comparison End Time cascade.

      image.png

3. Associated charts

After configuring basic information and options, associate charts in the Associated Charts section. Select a target chart and set the Date (day) field for the activity phase.

Note

Five chart types are supported: metric card, Indicator Card Trend, Ranking, Cross Table, and Details.

image.png

  • The following figure shows cross table and detail table association results with single-day filtering. Associated chart 1

  • The following figure shows metric card and leaderboard association results with day range filtering. 5.gif

On the chart's Analysis tab, click Advanced and configure the activity comparison settings.

image.png

Parameter/Option

Compare Name

Custom comparison name.

Display Content

  • For cross tables and detail tables: Difference Percentage, Difference, and Original Value.

  • For metric cards, card trend charts, and rankings: Percentage Difference and Difference.

If the data of the previous period is negative

When Percentage Difference is displayed and the previous period data is negative, select a formula to calculate the difference percentage. The selected formula applies only when the previous period value is less than 0. image.png

regular time comparison

Select a Comparison Date and a comparison metric to set comparison content. You can synchronize comparison metrics.

image.png

Note

Supported for metric cards, metric card trend charts, cross tables, and detail tables.

Display Position

For cross tables and detail tables: Metric Right, Independent Right, and Metric Bottom.

Display Style

For cross tables and detail tables: red-positive/green-negative or green-positive/red-negative.

image.png

Select a mark

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

image.png

Set the secondary indicator font style

Set the secondary indicator font style for metric cards and card trend charts.

image.png

Secondary Indicator Position

Set the Secondary Indicator Position for the metric trend chart.

image.png

Results

After completing the configuration, the control is associated with five charts. Select current and comparison activity content to view data such as order amount and price activity comparison in the associated chart.

image