Skip to content

Filter Operators

LightLead supports a rich set of operators for filtering report data, with AND/OR logic.

Comparison operators

OperatorDescriptionApplicable typesExample
EQUALExact matchstring, integer, float, boolean, enum, uuidStatus = active
NOT_EQUALNot equalstring, integer, float, boolean, enum, uuidStatus ≠ deleted
CONTAINContains a substringstringName contains "Search"
NOT_CONTAINDoesn't contain a substringstringName doesn't contain "test"
GREATER_THANGreater thaninteger, float, money, percentage, date, datetimeClicks > 100
LESS_THANLess thaninteger, float, money, percentage, date, datetimeSpend < 5000
GREATER_OR_EQUALGreater than or equalinteger, float, money, percentage, date, datetimeDate ≥ 2026-01-01
LESS_OR_EQUALLess than or equalinteger, float, money, percentage, date, datetimeCTR ≤ 5.0
INIs in a liststring, integer, enum, uuidCampaign ∈ ["A","B","C"]
NOT_INIs not in a liststring, integer, enum, uuidCampaign ∉ ["D","E"]
BETWEENWithin a range (inclusive)integer, float, money, date, datetimeDate 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

OperatorValue typeExample
EQUAL, NOT_EQUALString/number/boolean"active", 100, true
CONTAIN, NOT_CONTAINString"search"
GREATER_THAN, LESS_THAN, GREATER_OR_EQUAL, LESS_OR_EQUALNumber or date100, "2026-01-01"
IN, NOT_INArray["A", "B", "C"]
BETWEENTwo-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 money is always in the source's currency (no conversion applied)
  • Filtering on datetime is in UTC
  • You can't filter by calculated metrics (they're computed after filtering)

Maintained by the LightLead Documentation Team · Last verified: 2026-07-25