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

# ArrayExcept

> Use the Sigma ArrayExcept function to return an array of all unique elements from one specified array not included in another specified array.

The **ArrayExcept** function returns an array of all unique elements from one specified array not included in another specified array. The output array is unordered.

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

```
ArrayExcept(array1, array2)
```

### Function arguments

|            |                                                                      |
| :--------- | :------------------------------------------------------------------- |
| **array1** | An array that contains elements to be *included* in the new array.   |
| **array2** | An array that contains elements to be *excluded* from the new array. |

## Notes

* If either or both input arguments are null values, the function returns `null`.
* If all values in the first array are included in the second array, an empty array is returned.

## Example

A table lists all available colors of different clothing items. To see all colors available for each item, excluding the colors black and white, use the **ArrayExcept** function:

```
ArrayExcept([Colors], Array("black", "white"))
```

ArrayExcept returns all colors listed in the `[Colors]` column, excluding the colors specified in the `("black", "white")` array.

![5 rows of data with an item column, a colors column, and a column showing the output of ArrayExcept. The colors column has arrays of colors for each item. The shirt row has an array of white, black, black, and the dress array has red, green white. The ArrayExcept column for shirt shows an empty array and for dress shows red, green.](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/5d4ef8fa5d09a2c725e6f01f9bf0af1b2474e7e85db4acdf7ca82e4d42d85605/assets/docs-images/b115458f7b1a7a31fe4b19e58f6474838c67b22b666c2d20ef386880b207fdd9-arrayexcept.png)