Filter Operators
LightLead supports a rich set of operators for filtering report data, with AND/OR logic.
Comparison operators
| Operator | Description | Applicable types | Example |
|---|---|---|---|
EQUAL | Exact match | string, integer, float, boolean, enum, uuid | Status = active |
NOT_EQUAL | Not equal | string, integer, float, boolean, enum, uuid | Status ≠ deleted |
CONTAIN | Contains a substring | string | Name contains "Search" |
NOT_CONTAIN | Doesn't contain a substring | string | Name doesn't contain "test" |
GREATER_THAN | Greater than | integer, float, money, percentage, date, datetime | Clicks > 100 |
LESS_THAN | Less than | integer, float, money, percentage, date, datetime | Spend < 5000 |
GREATER_OR_EQUAL | Greater than or equal | integer, float, money, percentage, date, datetime | Date ≥ 2026-01-01 |
LESS_OR_EQUAL | Less than or equal | integer, float, money, percentage, date, datetime | CTR ≤ 5.0 |
IN | Is in a list | string, integer, enum, uuid | Campaign ∈ ["A","B","C"] |
NOT_IN | Is not in a list | string, integer, enum, uuid | Campaign ∉ ["D","E"] |
BETWEEN | Within a range (inclusive) | integer, float, money, date, datetime | Date between 2026-01-01 and 2026-01-31 |
Logical rules
Filters are combined using AND and OR logic.
AND — all conditions must be true
json
{
"logic": "AND",
"conditions": [
{"field": "clicks", "operator": "GREATER_THAN", "value": 100},
{"field": "cost", "operator": "LESS_THAN", "value": 5000}
]
}Result: rows where clicks are greater than 100 AND cost is less than 5000.
OR — at least one condition is true
json
{
"logic": "OR",
"conditions": [
{"field": "campaign_name", "operator": "CONTAIN", "value": "brand"},
{"field": "campaign_name", "operator": "CONTAIN", "value": "branded"}
]
}Result: rows where the name contains "brand" OR "branded".
Nested logic
You can combine AND and OR through nested groups:
json
{
"logic": "AND",
"conditions": [
{"field": "clicks", "operator": "GREATER_THAN", "value": 10},
{
"logic": "OR",
"conditions": [
{"field": "campaign_name", "operator": "CONTAIN", "value": "search"},
{"field": "campaign_name", "operator": "CONTAIN", "value": "retargeting"}
]
}
]
}Result: clicks greater than 10 AND (campaign contains "search" OR "retargeting").
The value type by operator
| Operator | Value type | Example |
|---|---|---|
EQUAL, NOT_EQUAL | String/number/boolean | "active", 100, true |
CONTAIN, NOT_CONTAIN | String | "search" |
GREATER_THAN, LESS_THAN, GREATER_OR_EQUAL, LESS_OR_EQUAL | Number or date | 100, "2026-01-01" |
IN, NOT_IN | Array | ["A", "B", "C"] |
BETWEEN | Two-element array | [100, 500], ["2026-01-01", "2026-01-31"] |
Notes
- CONTAIN — case-insensitive substring search
- BETWEEN — the bounds are inclusive (start ≤ value ≤ end)
- IN — up to 100 values in the list
- Filtering on
moneyis always in the source's currency (no conversion applied) - Filtering on
datetimeis in UTC - You can't filter by calculated metrics (they're computed after filtering)