GitHub user dosubot[bot] added a comment to the discussion: How can this sql 
add filter boxes for fields that are not query results

<!-- Answer -->
I found a similar unsolved discussion that might be relevant to your question: 
[When using sql sqllab, how to add a filter box for non-display fields to 
filter](https://github.com/apache/superset/discussions/31897) 
<sup>[[1]](https://github.com/apache/superset/discussions/31897)</sup>. This 
discussion addresses the challenge of adding filter boxes for fields that are 
not part of the query results in SQL Lab.

While there isn't a direct solution provided in the discussion, you might 
consider using Jinja templating to dynamically include filters in your SQL 
query. However, ensure that the filter values are correctly configured and 
passed to the query. If the chart is empty when using Jinja, double-check the 
filter configuration and ensure that the field names match those used in the 
`filter_values` function.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/189692e6-c959-473a-ae9e-4b48867baad3?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33187#discussioncomment-12880317

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to