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

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

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

    <a href="/docs/arrayagg">ArrayAgg</a>

     function,
  </dd>
</dl>

## Example

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

```
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://files.buildwithfern.com/sigma.docs.buildwithfern.com/81151bbec97163f54f1ace2225d76f209e1491e1673294fab6dbc855b8846b53/assets/docs-images/1b908cd-function-arraydistinct-example.png)

## Related resources

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