---
title: "nullif function in Strata | Oplema"
description: "Turn a sentinel value, such as zero or an empty string, into a missing value. Write it as nullif(a, b) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/nullif"
updated: "2026-11-04"
---

# nullif

Turn a sentinel value, such as zero or an empty string, into a missing value.

## Try an expression

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

### Expression

```
nullif(5, 0)
```

### Result

```
5
```

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

## Arguments and types

```
nullif(a, b)
```

**a**

Any value

**b**

Any value

Supported signatures (1)

```
nullif(a: ANY, b: ANY)
```

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

[ifnull

Use a fallback when a value is missing.

](https://oplema.com/docs/strata/functions/ifnull)[IS NULL

Find missing values without confusing them with empty text.

](https://oplema.com/docs/strata/functions/is-null)[BETWEEN

Check whether a value falls within an inclusive range.

](https://oplema.com/docs/strata/functions/between)[coalesce

Replace missing values with the first available alternative.

](https://oplema.com/docs/strata/functions/coalesce)

[Browse conditions & missing values](https://oplema.com/docs/strata/functions#conditions-&-missing-values) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/utility.html#nullifa-b)

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