> 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

> Use the Sigma Zn function to return the argument value if it is not Null, otherwise returns zero.

# 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://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/8901b865c0209c6e7dcb276669951fffa8c1048593098fa979bb7bad28cf4554/assets/docs-images/4b310ba-jk.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260817T044206Z&X-Amz-Expires=604800&X-Amz-Signature=2af366366989fd60b257ee0d075ca9216315e7c62218b704bd8246bfe45fc7d4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

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

## Related resources

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