<!-- https://learnsql.cpetoday.com/functions/dax/istext -->
# ISTEXT

Language: DAX
Category: Information
Syntax: ISTEXT(<value>)
Summary: Returns TRUE when a value is text.
Returns: TRUE or FALSE (a scalar).
Level: Beginner
Related: ISNUMBER, ISERROR, ISBLANK, VALUE, IF, LEN

## What it does
ISTEXT returns TRUE when a value is text and FALSE for numbers, blanks and errors. It is the mirror of ISNUMBER. Use it to find text where numbers are expected, such as an amount column that a spreadsheet user has typed a word into, or to decide whether a value needs VALUE before it can be added.

## Syntax and arguments
- value: the value to test.

## Example
The accounts payable import has an amount column that should hold numbers. The team wants a flag for any row where the amount is text, so they can fix it before the payment run.

```dax
Amount Is Text = ISTEXT(Imports[Amount])
```

Rows that hold text, such as "N/A" or "TBD", return TRUE. The list of TRUE rows is the correction list for the import team.

## Example: a second, different use
Decide whether a column needs conversion before it is used, in a calculated column:

```dax
Amount Clean =
IF(
    ISTEXT(Imports[Amount]),
    VALUE(SUBSTITUTE(Imports[Amount], ",", "")),
    Imports[Amount]
)
```

Text amounts are converted, and numbers pass through unchanged. The IF keeps one column that works for both types.

## Things to watch
- A number that is stored as text in the source is text in the model. ISTEXT returns TRUE, which is correct.
- A blank is not text, so ISTEXT(blank) is FALSE.
- Empty text may behave differently from a blank in some sources. Check the sample when a count looks off.
- ISTEXT is a type test only. It does not tell you whether the text is wrong.
- Convert the column type at the source or in Power Query when you can, rather than testing every row in DAX.

## In business terms
ISTEXT finds the rows in an import that would break a total: a stray note in an amount column, a date typed as text, a number with a currency symbol. Controllers use it as a control before an import is accepted.
