Understand Text Functions in Power Query M Language, crucial for creating and manipulating textual data. This page provides a comprehensive list and descriptions of Text Functions available in the M Language.
Table of contents
Conversion and Creation Functions
Extraction and Position Functions
Function Description Text.AfterDelimiter Returns the portion of text
after the specified delimiter
Text.At Returns the character at the specified position. Text.BeforeDelimiter Returns the portion of text
before the specified delimiter
Text.BetweenDelimiters Returns the portion of text
between the specified startDelimiter
and endDelimiter
Text.End Returns the last characters of the text. Text.Middle Returns the substring up to a specific length. Text.PositionOf Returns the first position of the value (-1 if not found). Text.PositionOfAny Returns the first position in the text value of any listed character (-1 if not found). Text.Range Returns the substring found at offset. Text.Select Selects all occurrences of the given character or list of characters from the input text value. Text.Start Returns the start of the text. Text.TrimEnd Removes all trailing whitespace. Text.TrimStart Removes all leading whitespace.
Function Description Text.Clean Returns the text value with all control characters removed. Text.Format Returns formatted text from a format string and arguments. Text.Lower Converts all characters to lowercase. Text.Proper Capitalizes the first letter of each word. Text.Trim Removes all leading and trailing whitespace. Text.Upper Converts all characters to uppercase.
Function Description Text.Contains Returns whether the text contains the substring. Text.EndsWith Indicates whether the text ends in the specified value. Text.InferNumberType Infers the granular number type (Int64.Type, Double.Type, and so on) of a number encoded in text. Text.Length Returns the number of characters. Text.StartsWith Indicates whether the text starts with a specified value.
Function Description Text.Combine Concatenates a list of text values into one text value. Text.Insert Inserts one text value into another at a given position. Text.PadEnd Returns text of a specified length by padding the end of the given text. Text.PadStart Returns text of a specified length by padding the start of the given text. Text.Remove Removes all occurrences of the given character or list of characters from the input text value. Text.RemoveRange Removes a count of characters starting at the given offset Text.Repeat Returns a text value composed of the input text repeated a specified number of times. Text.Replace Replaces all occurrences of the given substring in the text. Text.ReplaceRange Removes a range of characters and inserts a new value at a specified position. Text.Reverse Reverses the provided text
Text.Split Splits text into a list of text values based upon a specified delimiter. Text.SplitAny Returns a list of text values, split on any of the characters in the delimiter.
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy