Dropdown
A select filter. Its value lands in the reactive filters store under name;
any query using ${name} re-runs. Options come from a query column (data +
column) or a literal options list. Add multi for a multi-select that feeds
an IN (…) clause.
SELECT month, SUM(downloads) AS downloads
FROM downloads
WHERE '${channel}' = '' OR channel = '${channel}'
GROUP BY month
ORDER BY month
Pick a channel — the chart re-queries. The '${channel}' = '' guard makes "no
selection" mean "all".
Add multi for a multi-select whose chosen values expand into an IN (…) list
(the same empty-means-all guard applies):
SELECT month, SUM(downloads) AS downloads
FROM downloads
WHERE '${channels}' = '' OR channel IN (${channels})
GROUP BY month
ORDER BY month
| Attribute | Purpose |
|---|---|
name |
Required. Filter key (the ${name} your SQL reads). |
data + column |
Populate options from a query column. |
options |
…or a literal comma-separated list. |
label |
Control label. |
multi |
Multi-select → IN (…). |
url_sync |
Mirror the value to the URL (default true). |
bar |
Lift into the top filter bar (default: inline). |
Note
Filter controls drive server-side SQL substitution, so they're stripped from
dashdown build static exports (a fixed snapshot can't re-query). See
Filters.