Possible to use Field without Filter Field to map to?

Hi,

I'm trying to figure out if it's possible to get a dropdown menu for custom made filter variables. The query looks something like this;

WITH clause AS (

SELECT ID CASE WHEN X THEN A WHEN Y THEN B END AS 'A/B'
FROM data
)

SELECT *
FROM clause
[[WHERE A/B = {{A/B}}]]

The problem is that since A/B isn't a column in a table in our database I can't find a field to map it to. So I'm looking for a way to create a dropdown menu for the filter without using an existing column in our database, is this possible?

1 Like

Hi @holmberg
No, that's not how Field Filters work currently:
https://www.metabase.com/learn/sql-questions/field-filters#field-filter-gotchas
You are looking for this:
https://github.com/metabase/metabase/issues/5245 - upvote by clicking :+1: on the first post

1 Like

Hi, has this been solved? Is there any roadmap for this issue?

it's already in v46