admin管理员组文章数量:1291148
Can we extract the filter value(s) selected in a dashboard filter (applied on a different dataset's column, which is not present in my current dataset) using Jinja in Superset?
Issue: I tried using the following Jinja expression:
min("month_datetime_col") <=
dateadd(s, (
{% if filter_values ("month2_datetime_col")|length %}
{{ filter_values ("month2_datetime_col")[0] }}
{% else %}
extract(epoch from current_date)
{% endif %}
) / 1000, '1970-01-01 00:00:00')
However, I am facing two issues:
When applied to the same dataset, it first filters the dataset and then counts the IDs according to the condition. When applied to a different dataset, it always takes the else condition value. Goal: I am trying to calculate the total base of IDs up to the selected filter value. Specifically, I need a solution to:
Achieve the same logic in a table that has month-wise columns Get the total base of IDs till each month If anyone has a solution or an alternative approach.
版权声明:本文标题:jinja2 - Extracting the Values selected in the Filter on a column from a different dataset - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741527261a2383543.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论