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

# ArrayDistinct

> Use the Sigma ArrayDistinct function to return the input array without duplicate values and including null values.

The **ArrayDistinct** function returns the input array *without* duplicate values and including null values.

> **Info**
>
> This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```sigma
ArrayDistinct(array)
```

The **ArrayDistinct** function has the following argument:

<dl>
  <dt>
    array
  </dt>

  <dd>
    Required.
  </dd>

  <dd>
    The input array that Sigma parses to find and remove duplicates,
  </dd>

  <dd>
    Must be an array structure; to create single array from a column, use the 

    [ArrayAgg](/docs/arrayagg)

     function,
  </dd>
</dl>

## Example

```sigma
ArrayDistinct(Array('a', 1, 2, 1, ‘a'))
```

This may return `[1, 2, 'a']`. Note that the order elements in the the resulting array may not match the order of the input array.

```sigma
ArrayDistinct([Open prices array])
```

The **ArrayDistinct** function returns the following values for the **Open prices array** column as **Distinct open prices array**; note the differences in array length for each column:

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/81151bbec97163f54f1ace2225d76f209e1491e1673294fab6dbc855b8846b53/assets/docs-images/1b908cd-function-arraydistinct-example.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20261007%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261007T064335Z&X-Amz-Expires=604800&X-Amz-Signature=0bd2bbe534042f8b4d707aef592942fc6719a57794d3a3230596436cdf924d60&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [ArrayLength](/docs/arraylength)
* [ArrayContains](/docs/arraycontains)
* [ArraySlice](/docs/arrayslice)