LEN DAX Function (Text)
Returns the number of characters in a text string.
Syntax
Parameter | Attributes | Description |
---|---|---|
Text |
The text whose length you want to find. Spaces count as characters. |
Return values
The number of characters in the text string.
Examples
-- LEFT, RIGHT, MID and LEN are the basic string-manipulation functions DEFINE VAR Val = "DAX is so cool!" EVALUATE { ( "LEFT ( Val, 3 ) ", LEFT ( Val, 3 ) ), ( "RIGHT ( Val, 5 )", RIGHT ( Val, 5 ) ), ( "MID ( Val, 11, 4 )", MID ( Val, 11, 4 ) ), ( "LEN ( Val )", LEN ( Val ) ) }
Value1 | Value2 |
---|---|
LEFT ( Val, 3 ) | DAX |
RIGHT ( Val, 5 ) | cool! |
MID ( Val, 11, 4 ) | cool |
LEN ( Val ) | 15 |
Related articles
Learn more about LEN in the following articles:
-
Managing hierarchical organizations in Power BI security roles
This article describes how to apply dynamic security roles in a hierarchical organization to minimize the maintenance effort on the security configuration and obtain the best performance at query time. » Read more
Last update: Nov 14, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/len-function-dax