Overview
Version
Version | Functional Change |
---|---|
6.0 | / |
6.1.4 | Optimized the custom comparison with the same/previous period: 2. Supported the use of the date filter component to compare indicators across dynamic periods. |
Application Scenario
In a component, if you do not drag the date field to the dimension bar in the analysis area, you can use Custom Comparison with Same/Previous Period to compare indicators.
For example, you can use Custom Comparison with Same/Previous Period based on Contract Time to obtain values of the previous period and growth rates compared with the previous period, as shown in the following figure.
Function Description
The following shows the prerequisites for the function.
The data table contains a date dimension field, but you do not use the field in the dimension bar in the component.
The indicator used for Custom Comparison with Same/Previous Period calculations cannot be the calculation field.
1. Based on the period filtered by the date filter component, you can quickly calculate the value, growth value, and growth rate of comparison with the same/previous period.
2. You can customize the comparison of data between any two periods, enabling comparisons of Dynamic Time, Fixed Date, and Fixed Date Range.
Custom Comparison
Download the sample data Office Supplies Data.xlsx and upload it to the analysis subject.
Scenario One: Data Comparison Between Any Two Fixed Periods
You can use custom comparison values to compare data between any two periods.
For example, a merchant held the same promotional activity respectively in April 2019 and June 2020. The merchant wants to compare the sales of the two promotional months in 2019 and 2020, and calculate the growth rate of each product.
1. Calculating the Sales of April 2019
1. Drag Product Name and Sales into the Dimension bar and Indicator bar respectively, and set Custom Comparison with Same/Previous Period, as shown in the following figure.
2. Since Sales are calculated based on Contract Time, set Date Field to Contract Time. Set Calculation Type to Custom Comparison Value, and Time Type to Fixed Date Range (2019-04-01 to 2019-04-30), as shown in the following figure.
3. Modify the field name to Sales of April 2019, as shown in the following figure.
2. Calculating the Sales of April 2020
1. Copy Sales in the left to-be-analyzed area, rename the copied field as Sales of June 2020, and drag the added field into the component.
2. Similarly, set Custom Comparison with Same/Previous Period for the indicator, as shown in the following figure.
3. Calculating the Growth Value and Growth Rate
1. Copy two Sales fields in the left to-be-analyzed area, rename them as Growth Value and Growth Rate respectively, and drag the two fields into the component.
2. Calculate the growth value. Set Custom Comparison with Same/Previous Period for Growth Value, set Calculation Type to Custom Growth Value, and set the comparison date range, as shown in the following figure.
3. Calculate the growth rate. Set Custom Comparison with Same/Previous Period for Growth Rate, set Calculation Type to Custom Growth Rate, and set the comparison date range, as shown in the following figure.
4. Effect Display
Through the three calculation types (Custom Comparison Value, Custom Growth Value, and Custom Growth Rate), you can obtain the sales of the two promotional months, the growth values, and the growth rates, as shown in the following figure.
Scenario Two: Data Comparison Between Fixed Dynamic Periods
Through the dynamic time function, you can use custom comparison values to compare data between any two dynamic periods.
For example, you can compare the sales of last week with the same period three months ago to analyze quarterly data changes, as shown in the following figure.
Scenario Three: Custom Comparison with the Period Selected in the Filter Component
For example, you want the system to automatically calculate the sales growth rate compared with the same period of the previous month (2020-04-07 to 2020-04-17) after selecting a period ranging from 2020-05-07 to 2020-05-17, as shown in the following figure.
1. In Custom Comparison with Same/Previous Period, set Calculation Type to Custom Growth Rate and Time Type to Dynamic Time, as shown in the following figure.
2. Create a dashboard and add a Date Interval filter component to filter Contract Time, as shown in the following figure.

3. Drag the filter component into the dashboard, and you can obtain the growth rate of the same period in the previous month after selecting a date range, as shown in the following figure.

Calculating the Comparison with the Same/Previous Period
You can use Custom Comparison with Same/Previous Period to directly obtain the comparison with the same/previous period that can be obtained through the date filter component. This approach is simpler and more convenient than custom comparison.
For example, in scenario three, the system automatically calculates the sales growth rate compared with the same period in the previous month. Logically, this involves calculating the month-over-month growth rate.
To directly achieve the same result, reset the Growth Rate field and change Calculation Type to Growth Rate of Comparison with Same Period (Month), as shown in the following figure.
The calculated result is the same as that obtained in section "Scenario Three: Custom Comparison with the Period Selected in the Filter Component", as shown in the following figure.