Skip to content

Bug: Drill to Detail / Drill by Not Working Across Charts from Jinja-Based Datasets #35263

@ShivamYadav0

Description

@ShivamYadav0

Bug description

I'm working with three separate datasets, each built using Jinja templating to support dynamic filtering. These datasets are used to power three different charts in a dashboard. All charts share common filter fields (e.g., start_date, Zone, Circle, etc.), and I’ve configured native filters to apply across all charts.

Each dataset uses Jinja to apply filters like this:

SQL query is something like this in all 3 datasets.

WHERE 1=1
{% if filter_values('Zone') %}
AND "Zone" IN {{ filter_values('Zone') | where_in }}
{% endif %}

The charts display correct data when filters are applied. However, when I use Drill to Detail or Drill by on any chart, the resulting detail view shows zero records, even though the chart clearly shows data for the selected value.

Expected Behavior
Drill to Detail should return the filtered rows from the dataset that match the clicked chart element (e.g., Circle = C1, type_of_node = A).

Actual Behavior
Drill to Detail and Drill by return no rows, even though the chart shows non-zero values. This happens consistently across all three charts.

Notes

  1. All datasets use Jinja templating for dynamic filters.

  2. All charts are built from separate datasets, but they share common column names and filter logic.

  3. Native filters are scoped correctly to all charts.

  4. The issue seems to be with how Superset applies drill filters to Jinja-based queries across multiple datasets.

Screenshots/recordings

No response

Superset version

4.1.3

Python version

3.9

Node version

16

Browser

Chrome

Additional context

Image

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboard:drill-downRelated to drill-down functionality of the Dashboardglobal:jinjaRelated to Jinja templatingvalidation:requiredA committer should validate the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions