You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "debggr (via GitHub)" <gi...@apache.org> on 2024/08/15 19:53:47 UTC

Re: [I] How to add Filter selected value in Chart heading in superset dashboard [superset]

debggr commented on issue #26089:
URL: https://github.com/apache/superset/issues/26089#issuecomment-2292083989

   I found a hacky way to get it. Not perfect though.
   
   Basically create a dataset that returns the filter value.
   
   Dataset query:
   
   `{% if filter_values('filter_col_name') %}
     SELECT {{ filter_values('filter_col_name')|where_in }} as filter_value
   {% else %}
     SELECT 'Filter Not Selected' as filter_value
   {% endif %}`
   
   Then create a "WordCloud" chart with dimension `filter_value` as metric set to 0.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org