Text.Length
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns the number of characters in a text value.
Text.Length(text as nullable text) as nullable number
| Argument | Description |
|---|---|
| text | The input text value |
Text.Length("abc") equals 3
Text comparisons are performed by obtaining a comparer from Comparer.FromCulture. The comparer returns 0, a negative number, or a positive number based on the result of the comparison. The Comparer.Equals function is used to compare two text values.
let
comparer = Comparer.FromCulture("en-US", false)
in
[
comparisonResult = comparer("a","b"),
equalityResult = Comparer.Equals(comparer,"a","b")
]
Show: