Overview
How dashboard controls auto-create variables and feed them into dataset SQL and chart filters.
Controls are the dashboard’s filter surface — dropdowns, date pickers, text inputs. Drop one on the canvas, give its variable a name, and that variable is now available for any dataset or chart filter on the dashboard.
Control types
- Dropdown — single select, either from a manual list or from a dataset query.
- Multiselect — multi-select with the same source choices.
- Date — single date.
- Date range — start + end (with presets like "Last 30 days", "Month to date").
- Text input — free-form string.
- Apply button — batches every pending control change. When present, controls don’t auto-fire chart re-queries until the user clicks Apply.
- Refresh button — bumps a revision so every chart re-fetches even without a variable change.
How variables flow
- Drop a control. It gets a default variable name (e.g.
country_1) — rename it via the control’s config tab. - Reference the variable in dataset SQL with
{{country_1}}, or bind a chart-level filter to it. - As the viewer interacts with the control, the value changes, the chart re-queries.
Tip
Variables are scoped to one dashboard. Two dashboards can both have a country control and they won’t collide.
Cascading dropdowns
Two dropdowns where the second filters by the first’s value? Just reference the parent in the child’s options query:
SELECT DISTINCT city FROM customers
WHERE country = {{country}}
ORDER BY city
trend auto-detects the parent dependency and re-runs the child options query whenever the parent changes.
What to read next
- Templating with variables — the SQL side.
- Embed: per-customer attributes — how embed JWTs feed variables.