Is there any way at all to have dashboard filters more complex than matching on a column? I have a subset of data that is created by comparing multiple dates to one reporting period. I can build that in a sql question—is there any way to show that sql question on a dashboard and have it be controlled through a filter?
For reference, here is the filter in my question:
WHERE opened_fiscal_year <= [[ {{fiscal_year}} --]] (SELECT current_fiscal_year FROM var)
AND ( -- Filter for opened dates during or before reporting period
[[ opened_fiscal_quarter <= {{fiscal_quarter}} AND ]]
[[ ({{month}} IS NOT NULL AND opened_fiscal_month_int <= (SELECT var_month_int FROM var)) AND ]]
true
)
-- Filter for closed dates that are null or after the end of the reporting period
AND (
closed_date IS NULL
OR closed_fiscal_year > [[ {{fiscal_year}} --]] (SELECT current_fiscal_year FROM var)
OR (
closed_fiscal_year = {{fiscal_year}}
AND (
[[ closed_fiscal_quarter > {{fiscal_quarter}} AND ]]
[[ ({{month}} IS NOT NULL AND closed_fiscal_month_int > (SELECT var_month_int FROM var)) AND ]]
true
)
)
)