What are filtering criteria?
Filtering criteria are used to filter the dataset we have obtained by setting certain conditions, and then obtain the subset of data we want to analyze. All of Sensors Analytics' analytical functions have filtering options, which can be used to filter based on event attributes or user attributes.
The filtering conditions are analogous to the WHERE clause in SQL.
When using user filtering conditions, the WHERE clause applies to the users table; when using event filtering conditions, the WHERE clause applies to the events table.
Usage process
In all of Sensors Analytics' analytics functions, when you see buttons such as "Filter" and "Global Filter," it means you can filter users or events. Referring to the icons in the image above, the specific configuration process is as follows:
- Click to bring up the filter input box, where you can add one or more filter conditions at the same time.
- In option B, select the filter for events or user attributes.
- In C, select the attribute judgment type. Different attribute types have different judgment types. For the usage of different judgment types, please refer to Part 3.
- After entering the judgment value in option D, the analysis results will be filtered according to the input conditions.
Filter criteria classification
According to the goal
Filtering users: Filtering conditions are applied to the user table to only view users who meet the filtering conditions; generally, conditions are set on user attributes, or user groups are selected to obtain users that meet the analysis conditions.
Filtering events: Filtering conditions are applied to events, and only events that meet the filtering conditions are viewed; generally, the conditions are set on the event properties.
By data type
Whether you're filtering for different users or different events, the specific settings for each filter criterion can be understood according to its data type.
String type attribute filtering
When the filtered attribute is a string type, you can see the judgment types as shown in the image above. For details on the usage of each judgment type, please refer to the table below:
| Determine type | Analog to SQL | Description |
|---|---|---|
| equal | = | For precise determination, an event will only enter the analysis process if the selected event attribute matches the input judgment value; if multiple judgment values exist, the event will be included in the dataset for analysis as long as the event attribute value matches any one of them. |
| Not equal to | != | For precise determination, an event will only enter the analysis process if the selected event attribute is not equal to the input judgment value; if multiple judgment values exist, the event will not enter the analysis process if the event attribute value is equal to any one of them. |
| Include | LIKE "%$判断值%" | Matching criteria: When an attribute field contains a matching value, the event or user will enter the analysis process. |
| Not included | NOT LIKE "%$判断值%" | The matching condition, in contrast to "contains," prevents the event from proceeding through the analysis process if the attribute field contains the specified value. |
| Not empty | Length($属性)>0 | An event or user will only enter the analysis process if the attribute field contains a value (string length greater than 0). |
| empty | =="" | An event or user will only enter the analysis process when the value in an attribute field is an empty string. |
| Worthless | IS NULL | An event or user will only enter the analysis process if the value in an attribute field is NULL. |
| Value | IS NOT NULL | An event or user will only enter the analysis process if the value in the attribute field is not NULL. |
| Regular expression matching | Data matching the criteria is used for analysis; data that meets the criteria is then processed. For details, please refer to: Regular Expressions. | |
| Regular expression mismatch | The matching process determines which data does not meet the regular expression criteria and proceeds to the analysis stage. For details, please refer to: Regular Expressions. |
Numeric type attribute filtering
When the filtered attribute is a numeric type, you can see the judgment types as shown in the image above. For details on the usage of each judgment type, please refer to the table below:
| Determine type | Analogy expression | Description |
|---|---|---|
| equal | = | Similar to string type |
| Not equal to | != | Similar to string type |
| Less than | Only events whose selected attribute values are less than the judgment value will enter the analysis process. | |
| Greater than | > | Only events whose selected attribute value is greater than the judgment value will enter the analysis process. |
| interval | between and. | The event will only enter the analysis process when the selected attribute value falls within the closed interval formed by the set judgment values; for example, if the judgment values are set to 10 and 100, the selected attribute value must satisfy the interval [10, 100]. |
| Value | IS NOT NULL | Similar to string type |
| Worthless | IS NULL | Similar to string type |
Time type attribute filtering
Glossary
- Absolute time: A fixed range of time with a clearly defined start and end time.
- Time interval: A fixed time interval with a clearly defined start and end time.
- Relative time: A time range that determines a start and end time relative to a certain point in time.
- Relative to the current point in time: relative to a period of time prior to the present, such as 1 hour ago.
- Relative to the current time interval: Determine a start and end time relative to the current point in time.
When the filtered attribute is of the time type, you can see the judgment types as shown in the image above. For details on the usage of each judgment type, please refer to the following:
Absolute Time
If the absolute time is set to 00:00 on July 4, 2017 to 00:00 on July 11, 2017, then data within this time range (including the endpoints) will be included in the analysis process.
Time period
If the absolute time is set to 00:00 to 10:59, data within this time range for the selected attribute will be included in the analysis process.
relative to the current time point
If the time interval is within one day of the current time, it represents the time range from the current time minus one day to the current time. That is, [current time - 1 day, current time]. Note: Data is calculated to the nearest day.
For example: A query initiated at 12:05:22 on March 22nd, searching "within 1 day of the current time", will return data within the time range of [March 22nd 00:00:00, March 22nd 23:59:59].
If it's relative to one day prior to the current time, then it represents the time interval up to one day before the end point. That is, (infinitesimal time, current time - 1 day).
For example: A query initiated at 12:05:22 on March 22nd, "1 day ago relative to the current time", will return data with a time range of [-∞, March 21st 23:59:59].
relative to the current time interval
If you set the timeframe to be within 5 days to 3 days past the current time, it means the time interval is from the current time - 5 days to the current time - 3 days, i.e., [current time - 5 days, current time - 3 days].
relative event occurrence time
Here, the start and end points of the time interval are set based on the time anchor of the event. Therefore, the corresponding time interval for each event or user data that needs to be judged is different.
For example, if we want to see the number of users who registered for a purchase event within 5 minutes before the event, we can set the registration time to be within 5 minutes prior to the event. Based on the assumption that "the reason users register is to immediately purchase the product," we can see which types of products are more likely to attract users to register and make a purchase. Alternatively, we can replace this with coupons and see which types of coupons are more likely to attract users.
The phrases "within N days before" or "within N days after" here include the day the event occurred.
Valuable & Not Valuable
Please refer to the description of the string type, including whether it has a value or not.
Boolean type attribute filtering
When the filtered attribute is of boolean type, you can see the judgment types as shown in the image above. The specific usage of each judgment type is as follows:
True
This means that data will only be included in the analysis process when the attribute value is TRUE.
It is fake
This means that the data will only be included in the analysis process when the selected attribute value is FALSE.
Worth it & Worth it
Please refer to the descriptions of strings with and without values.
Filtering with dictionary type attributes
In Sensors Analytics' metadata management, you can set dimension dictionaries for attributes. For fields that have already had dimension dictionaries set, the filtering conditions are shown in the image below. For specific judgment fields, please refer to the corresponding types in the string type section.
User segmentation filtering
When performing conditional filtering, if user groups are selected, the judgment condition is the same as the Boolean type, indicating whether the user is within the specified group.
