cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databrick AI/BI Dashboard cross-filtering on the map glitch

meljung
New Contributor II

Hi everyone,

I recently started using AI/BI dashboard and I'm struggling with this glitch in the map. The visual was generated without any issues but the cross-filtering of the map for example, if I click on a county, the rest of the chart values change, but there's always one county that doesn't work at all. Sometimes the county changes, but there's always one that doesn't work. If I use actual filter widget, the county that didn't work on the map works fine. I tried many ways to debug, they didn't work.

  • Checked the underlying data and the data exists - no issue here
  • Deleted and created new map, the issue still persisted
  • Created new dashboard and map visual, the issue still persisted

For more context, the data is medical condition information where one user have multiple health conditions. The map was colored based on count_distinct of userid - an aggregated field. I tried using no aggregation, the map county cross-filter worked fine but the rest of the chart produced incorrect results. I don't know how to resolve this issue and if anyone encountered and resolved similar issue, please let me know.

Original data - map and chartsOriginal data - map and chartsA county cross-filter applied, other charts changedA county cross-filter applied, other charts changed

Another county cross-filter, the charts don't change.Another county cross-filter, the charts don't change.

2 REPLIES 2

Vasireddy
New Contributor III

Hey @meljung ,

The issue seems to stem from using an aggregated metric (`count_distinct(user_id)`) in the map visual.
When clicking on a county, the map attempts to filter other visuals using the underlying dimension, but inconsistencies may occur if the visual relies
on an aggregation for interactivity.

Recommended Fix:

1. Use a clear dimension field (e.g., `county_name`) as the basis for filtering in the map. This ensures cross-filtering works reliably when a county is clicked.

2. Keep `count_distinct(user_id)` only as the measure for display, but ensure it's not used as the source of the filter.

3. Update other visuals (like charts) to be filterable by `county_name`. This helps them respond correctly when the map applies filters.

4. (Optional) Add a filter widget for `county_name` to verify the data behaves correctly when filtered manually.

-->Why this works:

Databricks dashboards propagate filters based on dimension values, not aggregates.
If the map uses an aggregated field without a consistent dimension for filtering, it may not emit filters properly, causing some regions to appear unresponsive.

harisankar

meljung
New Contributor II

Thank you for replying @Vasireddy. Goal of the map chart is to show total number of people by county. Otherwise, it would be just a map that doesn't have much purpose in the dashboard. I tried using `county_name` directly as you proposed and checked the data as well, the issue still persists.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now