OpenBI Docs Buy

ISTEXT

Whether a value is text.

Group: Information. Compatible with DAX.

Syntax

ISTEXT ( <value> )
ParameterTypeDescription
valueValueWhat 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, try VALUE on it inside ISERROR.
  • ISSTRING is the same test; ISNONTEXT is 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 () )
)
PilsEmpty text42Text 42Blank
TRUETRUEFALSETRUEFALSE

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] )
    )
NoteISTEXTISNONTEXTISBLANK
PilsTRUEFALSEFALSE
(empty text)TRUEFALSEFALSE
(blank)FALSETRUETRUE

ISSTRING, ISNONTEXT, ISNUMBER, ISBLANK, VALUE.

Last updated · OpenBI Studio 0.3.74