Text.Upper is a Power Query M function that converts all characters in a text value to uppercase. The function returns the text value with all characters in uppercase, with an optional culture parameter to customize the conversion.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Text.Upper(
text as nullable text,
optional culture as nullable text,
) as nullable text
Argument | Attribute | Description |
---|---|---|
text | The string to transform into uppercase. | |
culture | optional | The culture argument enables the specification of a Culture code (e.g., “nl-NL” or “en-US”) to align transformations with local formatting conventions. If this argument is omitted, functions default to Culture.Current, which reflects the system’s regional settings. |
Description
The Text.Upper
function converts all the characters in a text string to uppercase. It supports language-specific rules for capitalization, allowing accurate conversion based on the provided culture code (for example, “en-US”).
Examples
Let’s explore some examples to understand how Text.Upper works.
Basic Usage
Text.Upper easily returns the uppercase version of a sentence.
Text.Upper( "aBcD" )
Language-Specific Capitalization
Some languages treat conversion to capital letters differently than others. Take for example the following example.
// Output: "YOU AND I ARE SO LUCKY"
Text.Upper( "You and i are so lucky", "en-US")
In the English language the letter “i” is capitalized to “I”. However, the Turkish alphabet treats this letter differently.
// Output: "YOU AND İ ARE SO LUCKY"
Text.Upper( "You and i are so lucky", "tr-TR")
In Turkish alphabet the letter “i” turns into the uppercase “İ”. Depending on your needs, you can use the relevant culture-code for capitalizing words respecting the grammar rules of a particular culture.
Related articles
Learn more about Text.Upper in the following articles:
- Text Functions in Power Query M (150+ Examples)
Your guide to Text Functions in Power Query M. Learn from practical examples and master Power Query’s most useful Text functions. » Read more
Related functions
Other functions related to Text.Upper are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy