ISTEXT
Whether a value is text.
Group: Information. Compatible with DAX.
Syntax
ISTEXT ( <value> )
| Parameter | Type | Description |
|---|---|---|
value | Value | What is tested: a constant, a column in a row context, a measure or any expression. |
Returns
Boolean. TRUE for text, empty text included; FALSE for numbers, dates, logical values and blanks.
Remarks
- Empty text is text: TRUE. A blank is not: FALSE.
- Digits in text are still text:
ISTEXT ( "42" )is TRUE. To know whether a text can be read as a number, tryVALUEon it insideISERROR. ISSTRINGis the same test;ISNONTEXTis its opposite, except that it calls a blank non-text.
Examples
Values of several types
EVALUATE
ROW (
"Pils", ISTEXT ( "Pils" ),
"Empty text", ISTEXT ( "" ),
"42", ISTEXT ( 42 ),
"Text 42", ISTEXT ( "42" ),
"Blank", ISTEXT ( BLANK () )
)
| Pils | Empty text | 42 | Text 42 | Blank |
|---|---|---|---|---|
| TRUE | TRUE | FALSE | TRUE | FALSE |
A text column with a blank
The second row holds empty text, the third a blank.
EVALUATE
VAR Notes = DATATABLE ( "Note", STRING, { { "Pils" }, { "" }, { BLANK () } } )
RETURN
ADDCOLUMNS (
Notes,
"ISTEXT", ISTEXT ( [Note] ),
"ISNONTEXT", ISNONTEXT ( [Note] ),
"ISBLANK", ISBLANK ( [Note] )
)
| Note | ISTEXT | ISNONTEXT | ISBLANK |
|---|---|---|---|
| Pils | TRUE | FALSE | FALSE |
| (empty text) | TRUE | FALSE | FALSE |
| (blank) | FALSE | TRUE | TRUE |