Hexa's Blog

Support dropdown with multiple value in Redash, plus ALL value

09/09/2021 Redash

In Redash, there is a big demand for dropdown with ALL value. However, it’s tricky to write where statement for ALL value. This post is all about work-around this issue. Thank for my colleague - Trieu. All Credit to him.

[1] Dropdown Field
[1] Dropdown Field

The dropdown configuration is in the following image.

[2] Dropdown Configuration
[2] Dropdown Configuration

In the where section, condition statement should look like this one

(column_name in (SELECT unnest(CONCAT('{', '', '}')::varchar[])) OR '' LIKE '%ALL%')

And It’s all done, you are ready to go!