OpenBI Docs Buy

LEN

How many characters a text has.

Group: Text. Compatible with DAX.

Syntax

LEN ( <text> )
ParameterTypeDescription
textTextThe text to measure; a number becomes text first.

Returns

Whole number. How many characters long the text is.

Remarks

  • A blank gives BLANK, while empty text gives 0.
  • Spaces count, at the ends too. TRIM removes the extra ones.
  • Characters are counted as DAX counts them: an emoji such as 😀 counts as 2.

Examples

Lengths

EVALUATE
ROW (
    "Lettøl", LEN ( "Lettøl" ),
    "Empty", LEN ( "" ),
    "Blank", LEN ( BLANK () ),
    "2026", LEN ( 2026 ),
    "With spaces", LEN ( " a " )
)
LettølEmptyBlank2026With spaces
60(blank)43

An emoji counts twice

EVALUATE
ROW ( "Emoji", LEN ( "😀" ), "Letter", LEN ( "a" ) )
EmojiLetter
21

The products' names

EVALUATE
SELECTCOLUMNS (
    Products,
    "Product", Products[Product],
    "Characters", LEN ( Products[Product] )
)
ORDER BY [Product]
ProductCharacters
Cider5
IPA3
Lettøl6
Pils4

LEFT, RIGHT, MID, TRIM, PATHLENGTH.

Last updated · OpenBI Studio 0.3.74