> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Zn

# Zn

The **Zn** function returns the argument value if it is not Null, otherwise returns zero. Zn allows the convenient use of zero values in place of Null values. 

## Syntax

`Zn(argument)`

**argument** (required) The number value to check.

The **Zn** function can analyze one argument at a time.

## Example

```
Zn(3)
```

* Returns 3

```
Zn(Null)
```

* Returns 0

```
Zn([Quantity])
```

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/8901b865c0209c6e7dcb276669951fffa8c1048593098fa979bb7bad28cf4554/assets/docs-images/4b310ba-jk.png)

* Returns 0 for every row in the column that is Null.

## Related resources

* [Coalesce](/docs/coalesce)
* [IsNull](/docs/isnull)
* [IsNotNull](/docs/isnotnull)