# Length

Length functions allow you to work out how long a text value is, either regarding how many characters it contains, or how many items there are in a list (if it's an array).

This is useful if you want to validate the format of expected values e.g. barcodes, or correctly [Slice](https://github.com/concentra-analytics/working-with-data/tree/51c414aad5b91e0da2741a07a436476e362ed6ce/strings/strings/slice.md) values apart at specified points.

See also [General > Count](https://orgvue.gitbooks.io/formula-translator/content/general/count.html).

## Excel

\=\~LEN!\~(‹cell›)

```
=LEN(A1) // "ava.wilkins@company.org" -> 23
```

## Tableau

\~LEN!\~(‹string›)

```
LEN([Email Address]) // "ava.wilkins@company.org" -> 23
```

## Alteryx

\~LEN!\~(‹string›)

```
LEN([Email Address]) // "ava.wilkins@company.org" -> 23
```

## OrgVue

‹dimension›.value.\~length!\~ \
&#x20;OR \
&#x20;‹array›.\~length!\~

```
node.emailaddress.value.length 
// "ava.wilkins@company.org" -> 23
// OR
node.c.length // counts the number of items in the array of node.c (ie span of control)
```

## tSQL

\~LEN!\~(‹field›)

```
SELECT LEN(EmailAddress) AS EmailLength
FROM EmployeesData
```

## Python

\~len!\~(‹string›) \
&#x20;OR \
&#x20;\~len!\~(‹array›)

```
len(emailAddress) # "ava.wilkins@company.org" -> 23
# OR
len(children) # counts the number of items in the array 'children'
```

NB. The above example assumes variables have been declared for `emailAddress` and `children` . For more information, go to [General > Variables](https://orgvue.gitbooks.io/formula-translator/content/general/variables.html).
