We are facing an issue with dynamically updating filters on our Metabase dashboard.
Our Setup:
- We created filters based on questions to restrict users from viewing data from other states or districts.
- Filters include "District", "Block", "Cluster", and "Program", expecting them to work dynamically together.
Queries Used:
-- District filter query
SELECT DISTINCT(district) FROM projects WHERE state = 'Karnataka';
-- Block filter query
SELECT DISTINCT(block) FROM projects WHERE state = 'Karnataka';
-- Big number query (linked to filters)
SELECT DISTINCT(project_id)
FROM projects
WHERE 1 = 1 AND state = 'Karnataka'
[[AND {{district_param}}]]
[[AND {{block_param}}]];
Steps Followed to Set Filters:
- Click "Add filter"
- Select "Text" or "Category"
- Map the filter to the big number query
- In the filter settings, select "Dropdown box"
- Link the District filter to the
distict_filter_sql_query
question - Select District as the column to supply values
- Save the filter
- Similarly, create a filter for Block
The Problem:
- When trying to link these filters, the option does not appear.
- We receive the message:
"Limit this filter's choices: If the filter has values that are from another question or model, or a custom list, then this filter can't be limited by another dashboard filter." - This means selecting a District does not dynamically update the Block, Cluster, and Program filters.
- This limitation makes it difficult for users to drill down or filter data correctly.
Question:
Is there a way to achieve dynamic linking between filters in Metabase?enter image description here