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

# Reverse

The **Reverse** function reverses the order of the characters in a string.

This function is useful for making text functions that normally work forwards from the beginning of a string, such as **Mid** or **Substring**, to instead work backwards from the end of the string.

## Usage

```
Reverse(text)
```

**text** (required)- Text or a column of text that you want to reverse.

## Example

```
Reverse("desserts")
```

* Returns “stressed”

```
[Extract Area Code (Failure)] = Mid([Phone Number], 5, 3)
[Extract Area Code (Success)] = Reverse(Mid(Reverse([Phone Number]), 6, 3))
```

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/4b17c941f2f554a084ced1be6459dc71b84bbd16eaaa690ee189f14ad8d3cf1c/assets/docs-images/0d29469-mceclip0_1.png)

## Related resources

* [Mid](/docs/mid)