---
title: "list_position function in Strata | Oplema"
description: "Find the position of a value in a list, where 1 is the first item. For example, list_position([1, 2, NULL], 2) returns 2."
url: "https://oplema.com/docs/strata/functions/list-position"
updated: "2026-11-04"
---

# list\_position

Find the position of a value in a list, where 1 is the first item. Returns a missing value if it isn't found.

Also available as array\_indexof, array\_position, list\_indexof.

## Try an expression

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

### Expression

```
list_position([1, 2, NULL], 2)
```

### Result

```
2
```

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 | 2 |

## Arguments and types

```
list_position(list, element)
```

**list**

List

**element**

Any value

Supported signatures (1)

```
list_position(list: T[], element: T) → INTEGER
```

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\_contains

Check whether a list contains a value.

](https://oplema.com/docs/strata/functions/list-contains)[list\_select

Build a list from the items at the given positions, where 1 is the first item.

](https://oplema.com/docs/strata/functions/list-select)[list\_transform

Apply a lambda expression to each list item and return the results as a list. The item type of the output comes from the lambda result.

](https://oplema.com/docs/strata/functions/list-transform)[list\_distinct

Remove duplicates and missing values from a list. The original order isn't kept.

](https://oplema.com/docs/strata/functions/list-distinct)

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

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