Linking Filters When Values Require Manipulation

We have an orders table where we have one line per order per customer. For that table, there is a column that is the aggregation of every item purchased within that order.

What we want is to have a dropdown filter where we can select an item and show only the orders that contain the item (whether it was the only item purchased or one of a few items purchased). We also want the dropdown filter to only show the items that have been purchased by a specific customer (shown through a different customer filter).

How do I link these two? If I create the filter values from the table, then the values become every distinct combination of items purchased in one order. When I take the filter values from a new question that separates out each distinct item, there is no way to link it to the customer filter.

What can I do here?

Can you confirm that the column data you want is stored as an array? Since metabase doesn't really supports arrays or json but simply interprets those as a string.

There is no proper workaround for this. but in version 49 there is the possibility to add multiple values to "contains" filter type so it will be like you are filtering an array but linked filters won't work

1 Like

Right. I mean, I was able to create a model that pulls each of the distinct items from the array and then use that model to populate the values for the drop-down filter menu. It just means that I can't link that filter with other filters, which poses a privacy problem in this instance.

Correct! That's the current limitation of that approach but currently is the only approach until metabase starts supporting array/josn columns