Overview

Version
Version | Functional Change |
---|---|
6.1 | / |
6.1.5 | Allowed you to adjust the dimension filter level to the fourth level (Quick Calculation Filter). |
Application Scenario
Filters and calculations are performed in fixed orders by default in the filter level system. In some cases, you may want to adjust the filter orders. For example, you want to view the order details in 2021 of repeat customers over the entire period. In this case, you need to perform two filters:
1. Filter the data in 2021 (belonging to the first filter level).
2. Use the DEF function to calculate data of customers with at least two purchases (belonging to the second filter level).
First, the system performs the first filter by default, but this will cause the result returned by the DEF function to be the number of repeat purchases per customer in 2021 rather than over the entire period. If you do not want the first filter to affect the DEF calculation, you can use the filter level adjustment function.
Function Description
You can adjust the filter levels for dimensions.
Example One: Adjusting the Filter Level from Level One to Level Two
Background: You want to view the order details in 2021 of repeat customers over the entire period.
You can download the sample data Office Supplies Data.xlsx.
Component Creation
1. Create an analysis subject, upload the sample data, and enter the component editing page, as shown in the following figure.
2. Create a calculation field named Customer Number, and drag Product Name, Customer Number, and Sales into the component to analyze repeat customer quantity and sales of each product.
The field Customer Number is obtained by the formula COUNTD_AGG(Customer) (which returns the distinct count of the Customer field).
3. Create a calculation field named Customer Order Count, as shown in the following figure.
Filter Condition Adding
1. Drag Customer Order Count into Filter and set the filter condition to the value of this field being greater than or equal to the fixed value 2, as shown in the following figure.
2. Drag Contract Time into Filter and filter this field to obtain the data in 2021, as shown in the following figure.
Filter Level Adjustment
After learning Level 1: Detail Filter and Level 2: New Column Filter Through the DEF Function, you can understand:
Contract Time = 2021: Data is filtered by dimension itself, which belongs to the first filter level (Detail Filter) by default.
Customer Order Count ≥ 2: Data in the new column obtained by the DEF function is filtered, which belongs to the second filter level (New Column Filter) by default.
The following figure shows the order in which these two filter conditions take effect for calculations, but the post-filter results cannot satisfy your need.
To count the repeat purchases of customers over the entire period, you need to obtain the new column (Customer Order Count) output by the DEF function and then filter Customer Order Count by the condition that the contract time is 2021.
The filter that takes effect after the new column output by the DEF function and before the component aggregation calculations belongs to the second filter level (New Column Filter).
To adjust the filter level to which the condition that the contract time is 2021 belongs, calculate the repeat purchases of customers first and then filter the calculated result by the condition that the contract time is 2021, as shown in the following figure.
At the same level, the filter conditions are in an AND relationship and not subject to orders.
1. Click the icon and select Adjust Dimension Filter Level from the drop-down list, as shown in the following figure.
2. Click the icon next to the Contract Time field and select New Column Filter from the drop-down list, as shown in the following figure.

The following figure shows the component calculation result after the adjustment, namely the purchase details in 2021 of the repeat customers over the entire period.
Example Two: Adjusting the Filter Level from Level One to Level Four
Background: You want to use the filter to quickly view the ranking of each city in Jiangsu province by sales across China.
Component Creation
Create a component by using the sample data Office Supplies Data.xlsx, drag the Province, City, and Sales fields to the analysis area, and calculate the rankings by sales, as shown in the following figure.
Filter Condition Adding
Drag Province into Filter and set a filter condition to display only the sales of Jiangsu province, as shown in the following figure.
Filter Level Adjustment
After learning about filter levels, you can understand that the condition that the province is Jiangsu is used to filter the dimension itself and belongs to the first filter level (Detail Filter) by default.
The current calculation order is as follows: First, obtain the data of Jiangsu province by filter, and then rank the cities by sales. In this case, what you obtain is the ranking of each city in Jiangsu province by sales.
However, what you want to obtain is the ranking of each city in Jiangsu province by sales across China. Therefore, you need to first rank the cities by sales across China and then obtain the data in Jiangsu province by filter.
Click Adjust Dimension Filter Level, and adjust the filter condition to Quick Calculation Filter for Province (namely the condition that the province is Jiangsu).
The following figure shows the post-adjustment calculation result, namely the ranking of each city in Jiangsu province by sales across China.
Filter Level Restoration
You can click the icon and select Auto from the drop-down list on the Adjust Dimension Filter Level page, as shown in the following figure.
Adjustable Filter Level
The adjustable filter levels vary according to dimension filter conditions. The following table describes the details.
Default Level | Adjustable Level | |
---|---|---|
Dimension filter at the first level | Filtering the dimension itself |
|
Dimension filter at the second level | Filtering the dimension depending on the indicator |
|
Filtering the dimension output by the DEF function |
|