Prashanth Gunjeti
Prashanth Gunjeti

Reputation: 11

Dynamic Filter Linking Issue in Metabase Dashboard

We are facing an issue with dynamically updating filters on our Metabase dashboard.

Our Setup:

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:

  1. Click "Add filter"
  2. Select "Text" or "Category"
  3. Map the filter to the big number query
  4. In the filter settings, select "Dropdown box"
  5. Link the District filter to the distict_filter_sql_query question
  6. Select District as the column to supply values
  7. Save the filter
  8. Similarly, create a filter for Block

The Problem:

Question:

Is there a way to achieve dynamic linking between filters in Metabase?enter image description here

Upvotes: 0

Views: 39

Answers (1)

Matthew Hefferon
Matthew Hefferon

Reputation: 1

You should be able to achieve this using linked filters in Metabase. Without the full context, I’d recommend double-checking that your data has the necessary relationships (e.g., between 'District,' 'Block,' etc.).

Here’s the documentation, which might help: https://www.metabase.com/learn/metabase-basics/querying-and-dashboards/dashboards/linking-filters.

Upvotes: -1

Related Questions