Feature Request: Multi-Select Support for Native SQL Text / Dropdown Filters

Summary

Enable multi-select capability for Native SQL text filters (custom dropdown variables) similar to Field Filters, allowing users to select multiple values and use them in IN clauses.


Problem Statement

Currently, when using a Text filter with custom dropdown values in a Native SQL query, Metabase replaces the variable with a single selected value.

For example:

SELECT *
FROM products
WHERE cat = {{category}}

If the user selects cat_a, Metabase replaces it as:

WHERE cat = 'cat_a'

However, there is no native support for selecting multiple values (e.g., cat_a, cat_b) and having Metabase automatically format it for use in an IN clause.

This forces users to:

  • Use Field Filters (which may not always be suitable)

  • Or manually implement workarounds (e.g., comma-separated parsing in SQL)

  • Or duplicate dashboards for different filtering needs


Expected Behavior

Allow Text / Custom Dropdown filters in Native SQL to:

  1. Support multi-select

  2. Automatically format selected values appropriately for SQL IN usage

Example:

If a user selects:

cat_a
cat_b

Then:

WHERE cat IN {{category}}

Should be rendered as:

WHERE cat IN ('cat_a', 'cat_b')


Example Use Case

SELECT
    cat,
    COUNT(*) AS total
FROM products
WHERE 1=1
[[ AND cat IN {{category}} ]]
GROUP BY cat

drop_down_option

filter_dropdown_list

Your AI-generated post is confusing and hard to read, but this is a feature that already exists.

I meant in native sql query. If i add a text filter and give a manual drop down list, it only has the option to select one from the drop down. But i am asking about multi select there as well similar to field filter (multi select drop down).

Yes, the link I posted goes right to the documentation that explains how to write multi-select filters. It works exactly as you described.

What version of Metabase are you using? It might not be there if you are using a very old version, like prior to 55.

Yes, updated to the latest version and it’s there. Thanks :slight_smile: