Text functions
Text functions functions for Power Query M language.
Functions
Function | Description |
---|---|
Character.FromNumber | This function provides the character that corresponds to a given numeric value. |
Character.ToNumber | This function will return the numerical value of the input character. |
Guid.From | The function returns a Guid.Type value based on the input value. If the input value is null, the function returns null as well. It includes a validation process to ensure the input value is in the cor... |
Json.FromValue | This function generates a JSON format of a given value, using a specified text encoding provided by encoding. If encoding is not specified, UTF8 is used as the default. The values are represented in t... |
Text.AfterDelimiter | This function retrieves the text that appears after a designated delimiter. Users have the option to specify a numeric index to indicate which occurrence of the delimiter should be used. Additionally,... |
Text.At | This function retrieves a specific character from a given text value at the specified position, known as the index. It is worth noting that the first character in the text is located at position 0. |
Text.BeforeDelimiter | This function retrieves the text before a specified delimiter. It includes optional parameters to specify which occurrence of the delimiter should be used and whether the indexing should start from th... |
Text.BetweenDelimiters | This function retrieves the text located between the specified startDelimiter and endDelimiter. It also allows optional input for a numeric startIndex to specify which instance of the startDelimiter t... |
Text.Clean | This function returns a string value that has been stripped of all control characters. |
Text.Combine | This function returns a single text value that is a combination of the list of text values provided. Null values in the list are not included in the final result. Optionally, a separator can be specif... |
Text.Contains | This function identifies if a text includes a specific value within it. It will return true if the value is located. Please note that this function does not work with wildcards or regular expressions.... |
Text.End | This function retrieves a text value containing the last specified number of characters from the original text value. |
Text.EndsWith | This indicates if the provided text ends with a specific value or substring. The comparison is sensitive to letter case. The comparer used controls the comparison. Comparers can adjust the comparison ... |
Text.Format | This function generates formatted text by plugging in arguments from a list or record into a specified format string. You can also specify an optional culture, such as "en-US". |
Text.From | The function returns the textual representation of a given value, which can belong to different data types such as number, date, time, datetime, datetimezone, logical, duration, or binary. If the prov... |
Text.FromBinary | Converts binary data into text data using a specified encoding method. |
Text.InferNumberType | Determines the specific numerical data type (Int64.Type, Double.Type, etc.) of the input text. An exception will be generated if the text is not a numerical value. There is an option to include a spec... |
Text.Insert | This function returns the outcome of inserting a new text value (newText) into an existing text value (text) at a specific position (offset). Positions are numbered starting from 0. |
Text.Length | This function will provide the count of characters present in the specified text variable. |
Text.Lower | This function converts all characters in the input text to lowercase. It allows for an optional parameter to specify the culture, such as "en-US". |
Text.Middle | Returns a specified number of characters starting from a designated position within the text. If no specific count is provided, it will return characters up to the end of the text from the specified s... |
Text.NewGuid | Generates a fresh, randomly generated globally unique identifier (GUID). |
Text.PadEnd | This function returns a text string that has been expanded to a specific length by adding spaces at the end of the original text. You may also choose to use a different character for padding by specif... |
Text.PadStart | It will return a text value that has been padded to a specific length by adding spaces at the beginning of the text. You can also specify a different character to use for padding by including the opti... |
Text.PositionOf | This function retrieves the position of a specified text value substring within a larger text. An optional parameter, "occurrence," can be included to specify which occurrence position to return (with... |
Text.PositionOfAny | This function will retrieve the index of the first instance of a character from a specified list (characters) within a given text. The optional argument 'occurrence' can be used to choose which specif... |
Text.Proper | The function will capitalize the initial letter of each word in the provided text while converting all other letters to lowercase. It also allows the inclusion of an optional culture parameter, such a... |
Text.Range | This function retrieves a portion of the text starting from a specified position called offset. Additionally, users can choose to specify the number of characters to extract by including an optional p... |
Text.Remove | Eliminates any instances of a specific character or set of characters from a given text value. The removeChars parameter can consist of either a single character or a series of character values. |
Text.RemoveRange | This function returns a new text value that excludes the characters starting from the specified offset position. You can also specify an optional parameter, count, to indicate the number of characters... |
Text.Repeat | This function generates a new text value by repeating the original input text a specified number of times. |
Text.Replace | This function returns the outcome of substituting all instances of the old text value with the new text value in the specified text. It is important to note that this function distinguishes between lo... |
Text.ReplaceRange | This function returns the outcome of eliminating a specified quantity of characters, count, from the text value text starting at position offset. Afterwards, it inserts the text value newText at the s... |
Text.Reverse | Inverts the given text. |
Text.Select | The function returns a modified version of the input text, where all the characters not specified in the selectChars parameter are removed. |
Text.Split | This function generates a list of text values by breaking down a given text value according to a specific delimiter or separator. |
Text.SplitAny | This function generates a list of text values by dividing a given text value based on any character present in the specified delimiter set. |
Text.Start | This function retrieves the initial count characters from the given text and returns them as a text value. |
Text.StartsWith | This function returns true if the specified text value begins with the specified substring value. text: The text value that will be searched. substring: The text value that will be searched for withi... |
Text.ToBinary | Converts the provided text input, text, into a binary format using the chosen encoding method. |
Text.ToList | This function retrieves a collection of individual character values from the specified text input. |
Text.Trim | This function removes any blank spaces at the beginning or end of a text value and returns the modified text. |
Text.TrimEnd | Eliminates any specified characters from the end of the original text value using trimChars. |
Text.TrimStart | Eliminates any instances of the specified characters in trimChars from the beginning of the original text value. |
Text.Upper | The function converts all characters in the input text to uppercase. It also allows for an optional culture parameter to be specified, such as "en-US". |