How to save the default filter in the dashboard #31320
Replies: 6 comments 1 reply
-
@dosu Can you please help me |
Beta Was this translation helpful? Give feedback.
-
I found a similar unsolved discussion on saving default filter values in a Superset dashboard: Saving default values filter in a dashboard [1]. In Superset, you can specify default filter values in the default_filters = json.loads(json_metadata.get("default_filters") or "{}")
...
default = default_filters.get(key, {}).get(field)
...
if default:
fltr["defaultDataMask"] = {
"extraFormData": {"granularity_sqla": default},
"filterState": {"value": [default]},
} This indicates that you can set default filter values by specifying them in the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
@dosu can you assign this to a maintainer |
Beta Was this translation helpful? Give feedback.
-
This is a tough nut to crack, could really use your help on this, @rusackas. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
@rusackas can you please check on this |
Beta Was this translation helpful? Give feedback.
-
When you add a native filter, there is a checkbox that you can check that sets a default value. A dropdown will then appear and you can select the defaults you want and save the filter. I believe you also need to be the dashboard owner to create a filter, so if you aren't you may need to save a copy of the dashboard first. |
Beta Was this translation helpful? Give feedback.
-
Bug description
How to save the default filter in the dashboard
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions