Multiple filters in native (UI) filter

Is it possible to specify multiple filters? For example, I want to exclude all rows where the the column “TYPE” is equal to “ABC” and “DEF”. I can do one at a time with “!=ABC” and “!=DEF” but I’d like to do them at the same time.

Has this been implemented yet? If not, will this be implemented and when?

Hello @klamike could you please provide a little more context? If you have a pandas DataFrame you can filter it like with various methods, for example df.query("TYPE != 'ABC'").query("TYPE != 'DEF'") . If you would like do this kind of filters in a Dash datatable you can transform it to pandas for this.

It is possible to do this by wiring a separate component, like a dcc.Textarea, to the filter_query property of the datatable. The filter_query property allows much richer expressions including and operators.

I don’t have a complete example at the moment, but here’s a partial example from another project.

app.layout = ddk.App([

        style={'width': '100%', 'height': '200px'},
        {id} > 100 and
        ({State} = TX or {State} = NJ) and
        {Date received} = {Date sent to company} and
        {Product} contains Debt and
        {Date received} datestartswith "2015-03"

            columns=[{ 'id': i, 'name': i, 'type': types.get(i, 'any') } for i in df.columns],
            fixed_rows={'headers': True},
                'width': '200px'

    Output('demo-table', 'filter_query'),
    [Input('filter-input', 'value')])
def update_filter(value):
    value = value.strip()
    return value
three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online