GitHub user dosubot[bot] added a comment to the discussion: Passing parameters
<!-- Answer -->
Superset lets you scope dashboard filters to specific charts using the filter
configuration UI. You can assign each filter to only the charts you want by
editing the filter's scope in the dashboard's filter modal—just include or
exclude charts in the tree view. This way, each chart can have its own
independent filter, and the filter values will be passed to your Jinja SQL via
`filter_values()` for that chart only.
However, Superset does not support activating a filter just by clicking on a
chart; filter scope is set statically in the dashboard configuration, not
dynamically by interaction. For your stored procedure setup, as long as your
filters are mapped to the correct dataset columns and
`ENABLE_TEMPLATE_PROCESSING` is enabled, your Jinja logic will receive the
right values per chart based on the filter scope you set in the dashboard UI.
If you want a filter to apply only inside a subquery, use `filter_values('col',
remove_filter=True)` in your SQL.
If you need to remove a filter from a chart, use the tab in the add/edit
filters modal to exclude that chart from the filter's scope. More details on
this scoping model are in the [frontend
code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx)
and [discussion](https://github.com/apache/superset/discussions/35233).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/e0515124-c281-4098-8456-939d060a205d?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35462)
GitHub link:
https://github.com/apache/superset/discussions/35462#discussioncomment-14579453
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]