-
Notifications
You must be signed in to change notification settings - Fork 89
Update LEN function behavior details in documentation #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,10 @@ A whole number indicating the number of characters in the text string. | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - If you use LEN with a column that contains non-text values, such as dates or Booleans, the function implicitly casts the value to text, using the current column format. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - Starting with desktop january release, user can set new model property UnicodeCharacterBehavior. Depending on value of the property, the output of LEN(<text>) function changes. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| - Starting with desktop january release, user can set new model property UnicodeCharacterBehavior. Depending on value of the property, the output of LEN(<text>) function changes. | |
| - Starting with the January desktop release, users can set the new model property UnicodeCharacterBehavior. Depending on value of the property, the output of LEN(<text>) function changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there a ' missing? len('🍕')? same a couple of lines earlier.
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string literal '😀 is missing a closing single quote. It should be '😀' to properly close the string.
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) will return => 1. This will be new behavior of LEN function. | |
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀') will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀') will return => 1. This will be new behavior of LEN function. |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name should be consistently uppercase. Change "len('😀)" to "LEN('😀')" to match the standard DAX function naming convention used throughout the documentation (e.g., line 14, 31, 33, 41).
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) will return => 1. This will be new behavior of LEN function. | |
| - With CodeUnits default value of UnicodeCharacterBehavior property, the LEN('😀') will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the LEN('😀') will return => 1. This will be new behavior of LEN function. |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name should be consistently uppercase. Change "len('😀)" to "LEN('😀')" to match the standard DAX function naming convention used throughout the documentation (e.g., line 14, 31, 33, 41).
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) will return => 1. This will be new behavior of LEN function. | |
| - With CodeUnits default value of UnicodeCharacterBehavior property, the LEN('😀') will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the LEN('😀') will return => 1. This will be new behavior of LEN function. |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the informal "=>" notation with clearer language such as "will return 2" or "returns 2" to be consistent with more formal technical documentation style.
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) will return => 1. This will be new behavior of LEN function. | |
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) returns 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) returns 1. This will be new behavior of LEN function. |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new documentation about UnicodeCharacterBehavior contradicts the existing remark on line 31 which states "LEN always counts each character as 1, no matter what the default language setting is." Since the behavior now changes based on the UnicodeCharacterBehavior property setting, line 31 should be updated to clarify that this statement applies only to the default CodeUnits behavior, or be revised to reflect the conditional behavior.
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string literal '😀 is missing a closing single quote. It should be '😀' to properly close the string.
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀) will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀) will return => 1. This will be new behavior of LEN function. | |
| - With CodeUnits default value of UnicodeCharacterBehavior property, the len('😀') will return => 2. This is old behavior of LEN function. | |
| - With CodePoints value of UnicodeCharacterBehavior property, the len('😀') will return => 1. This will be new behavior of LEN function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend we don't make it so dependent on the january release in the docs. I'd just say: In recent versions, you can set the UnicodeCharacterBehavior property.