---
title: "list_where function in Strata | Oplema"
description: "Filter a list with a matching list of true or false values, keeping the values marked true. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/list-where"
updated: "2026-11-04"
---

# list\_where

Keep the list items whose matching position in a second list of true and false values is true.

Also available as array\_where.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
list_where([10, 20, 30, 40], [true, false, false, true])
```

### Result

```
'[10, 40]'
```

The expression returns `INTEGER[]`. Formula stores it as `VARCHAR` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \[10, 40\] |

## Arguments and types

```
list_where(value_list, mask_list)
```

**value\_list**

List

**mask\_list**

List

Supported signatures (1)

```
list_where(value_list: T[], mask_list: BOOLEAN[]) → T[]
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[list\_resize

Resize a list to the given size. New items take the given value, or a missing value if none is given.

](https://oplema.com/docs/strata/functions/list-resize)[array\_pop\_back

Remove the last value from a list.

](https://oplema.com/docs/strata/functions/array-pop-back)[array\_pop\_front

Remove the first value from a list.

](https://oplema.com/docs/strata/functions/array-pop-front)[array\_push\_front

Add a value at the beginning of a list.

](https://oplema.com/docs/strata/functions/array-push-front)

[Browse lists & arrays](https://oplema.com/docs/strata/functions#lists-&-arrays) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/list.html#list_wherevalue_list-mask_list)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
