0

I try to filter multiple values in the same column in CartoDB. I then like to filter on another column.

I do not manage to filter on multiple values in one column in the graphical interface (one value ok, but more I see no way to do this).

I then write the SQL query:

    SELECT * FROM bdi_adm2 
WHERE name_1 ILIKE '%bururi%' 
OR name_1 ILIKE '%cancuzo%' 
OR name_1 ILIKE '%karuzi%' 
OR name_1 ILIKE '%makamba%' 
OR name_1 ILIKE '%rutana%' 
OR name_1 ILIKE '%ruyigi%'

But then I am not able to filter on another column (it tells me that I have to clear the selection first).

How can I filter through the input box for multiple values?

0

Queries and filters cannot be mixed in that way at the moment. A query cannot be reinterpreted in the filters view.

You can add multiples filters on the Filter feature by clicking on the '+' icon that appears below a current filter.

enter image description here

These filters are, though, built as an AND query between them, so results will need to match all the applied filters for your columns.

In my case, the query generated by the following configuration is: enter image description here

SELECT * FROM uk_wine_climate_map_iii_copy WHERE column1 IN ('One') AND column2 IN ('A','C')

If you want to add more columns to your filter you can create a query and you just need to concatenate the constraints on your columns that you need.

SELECT * FROM bdi_adm2 
WHERE name_1 ILIKE '%bururi%' 
OR name_1 ILIKE '%cancuzo%' 
OR name_1 ILIKE '%karuzi%' 
OR name_1 ILIKE '%makamba%' 
OR name_1 ILIKE '%rutana%' 
OR name_1 ILIKE '%ruyigi%'
OR other_column ILIKE '%something%'
OR extra_column = 'Yes'
OR numerical_column = 25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.