I created a dashboard and defined a question(SQL native question). I added the question in the dashboard,
then I modified the question to add a filter.
When I want to add the filter in the dashboard, I cannot select it , even if it is present in the breakdown list of filters.
with table_a(tag, ape, count) as(
SELECT
"source"."tag" AS "tag",
"source"."ape" AS "ape_bin",
SUM(COUNT(*)) OVER (
PARTITION BY "source"."tag"
ORDER BY "source"."ape" ASC
ROWS UNBOUNDED PRECEDING
) AS "cumulative_count"
FROM
(
SELECT
(FLOOR("source"."ape" / 1.25)) * 1.25 AS "ape",
"source"."tag"
FROM
(
SELECT
"PUBLIC"."errors_tag_20241017125948"."_mb_row_id" AS "_mb_row_id",
"PUBLIC"."errors_tag_20241017125948"."ape" AS "ape",
"PUBLIC"."errors_tag_20241017125948"."tag" AS "tag"
FROM
"PUBLIC"."errors_tag_20241017125948"
WHERE
{{tag_filter}} -- This is a Metabase variable filter
and "ape" <= {{ape_upper_threshold}}
) AS "source"
) AS "source"
GROUP BY
"source"."ape", "source"."tag"
ORDER BY
"source"."tag", "source"."ape" ASC)
select tag, concat(' < ', ape+1.25) as max_ape, count/max(count) over(PARTITION by tag) as perc_population
from table_a
I have the issue with a simple filter and even with a field filter.
It's happening only on sql questions and it's really annoying.
When I create a new dashboard and try to add filters without changing anything to the question it's working