You are learning Power Query in MS Excel
How to perform text manipulation functions (uppercase, lowercase, replace) in Power Query?
Power Query offers several functions for text manipulation, including uppercasing, lowercasing, and replacing text. Here's a breakdown of how to use them:
Uppercase:
* Function: Text.Upper
* Example: `Text.Upper("hello world")` => "HELLO WORLD"
Lowercase:
* Function: Text.Lower
* Example: `Text.Lower("HELLO WORLD")` => "hello world"
Replace:
* Function: Text.Replace
* Example: `Text.Replace("This is an example", "example", "replacement")` => "This is an replacement"
Explanation:
* Each function takes the text string you want to manipulate as the first argument.
* Text.Upper and Text.Lower simply convert the entire text string to uppercase or lowercase, respectively.
* Text.Replace has three arguments:
* The original text string.
* The substring you want to replace.
* The replacement text you want to insert in place of the substring.
Additional Points:
* You can combine these functions to achieve more complex manipulations.
* For example, `Text.Upper(Text.Replace("This is an Example", "Example", "replacement"))` => "THIS IS AN REPLACEMENT" (converts "replacement" to uppercase after replacing).
* Power Query offers other functions for text manipulation like:
* Text.Trim: Removes leading and trailing spaces from text.
* Text.Start: Extracts a specific number of characters from the beginning of a text string.
* Text.End: Extracts a specific number of characters from the end of a text string.
* Text.Split: Splits text into a list based on a delimiter (e.g., comma, space).
Explore the Power Query M function reference for a complete list of text manipulation functions and their detailed usage: [https://learn.microsoft.com/en-us/powerquery-m/power-query-m-function-reference](https://learn.microsoft.com/en-us/powerquery-m/power-query-m-function-reference)