Overview
Filter conditions for data columns can be configured flexibly. In addition to the general simple setting, several commonly used methods are also available.
Using nofilter in Filter Condition
nofilter means no filter, and is usually used to indicate that a filter condition is ineffective when a certain condition is not met.
if(len($area)==0, nofilter, $area) means that if the value of the parameter area is empty, the data will not be filtered. Otherwise, the data will be filtered based on the parameter value, as shown in the following figure.
Filtering After Processing a Specific Column
When the values in a column are special, you can use this method to filter the data by extracting a specific part of those values.
For example, if you want to set the filter condition that the first three digits of order IDs are 103, you can use left(Order ID,3)=103 to extract the order IDs whose first three digits are 103. You can use column names directly in the formula, as shown in the following figure.
Combining Filter Conditions with AND and OR
This method is usually used when you need to use different filter conditions based on various scenarios.
For example, if you use Shipper's region Equal to area and Shipper's country Equal to country and Shipper's city Equal to city, the data will be filtered when all three filter conditions are met, as shown in the following figure.
When the shipper's region is Southeast Asia, the shipper's country is Singapore, and the shipper's city is Singapore, the following figure shows the queried data.
When the total number of filter conditions exceeds two, you need to use brackets to group multiple conditions for calculation. After you press the Ctrl key and select any two filter conditions, Add Bracket will change from grayed out to available. In this case, you can click Add Bracket to merge the two filter conditions.
For example, you can use Shipper's region Equal to area or Shipper's country Equal to country and Shipper's city Equal to city as filter conditions, and select Southeast Asia, Thailand, and Bangkok Metropolis for the drop-down boxes region, country, and city, respectively. In this case, the query logic is to filter data whose region is Southeast Asia or whose country is Thailand, and then filter the data whose city is Bangkok Metropolis, as shown in the following figure.
Press the Ctrl key and select or Shipper's country Equal to country and Shipper's city Equal to city, click Add Bracket, and select Southeast Asia, Brunei, and Brunei and Muara for the drop-down boxes area, country, and city, respectively.
In this case, the query logic is to obtain the data with the region Southeast Asia, or the data with the city Brunei and Muara, and the country Brunei by filter, as shown in the following figure.