Courses / Power Query (Get & Transform)
29. Extract Text with Text.Start, Text.Middle, Text.End
Using M text functions to extract substrings from text values for column transformations.
Power Query M
Extract Text with Text.Start, Text.Middle, Text.End
Functions that return slices of a text value: the first N chars, a chunk from the middle, or the last N chars.
"I need the area code, the middle ID, and the last 4 digits from this column of phone numbers."
Text.Start(text, count) returns the first count characters; Text.Middle(text, offset, count) returns count characters starting at zero-based offset; Text.End(text, count) returns the last count characters.
"I need the area code, the middle ID, and the last 4 digits from this column of phone numbers."
Text.Start(text, count) returns the first count characters; Text.Middle(text, offset, count) returns count characters starting at zero-based offset; Text.End(text, count) returns the last count characters.