Text.Upper

Updated on

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
ArgumentAttributeDescription
textThe string to transform into uppercase.
cultureoptionalThe 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.

Learn more about Text.Upper in the following articles:

Other functions related to Text.Upper are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/text-upper

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy