FAQ: OR filters (e.g. country = FR OR CA) in Embeddable

Can I build an OR filter like country = 'FR' OR country = 'CA'?

Yes — if you pass multiple values to a single filter, Embeddable treats it as an OR (SQL IN).

Example (code-based datasets / loadData)

loadData({
  filters: [
    { property: "country", operator: "equals", value: ["FR", "CA"] },
  ],
})

This generates SQL like:

WHERE country IN (?, ?)


Why doesn’t it work if I add two filters?

Because multiple separate filters are combined with AND logic.

  • :white_check_mark: Single filter + array of values → OR (IN)

  • :cross_mark: Two filters on the same field → AND (country = 'FR' AND country = 'CA')


Can I do this from the Dashboard / Dataset UI (no code)?

Yes — use this workaround:

Workaround: Multi-value text variable

  1. Create a Text variable.

  2. Enable Multiple values.

  3. Enter each value on a new line, for example:

    FR
    CA
    
    
  4. Go to your dataset, add a filter:

    • Operator: equals

    • Value: connect it to the variable you created

Result: the dataset will return rows where country is FR OR CA, which works well for things like KPI components that reuse a dataset.


Can I build more complex logic like (A AND B) OR C?

Not yet. Dataset filters currently apply simple AND across filters. Nested AND/OR logic is a roadmap item - give it a vote!