Text.Proper

Text.Proper is a Power Query M function that capitalizes the first letter of each word in a text value, with all other letters in lowercase. The function returns the modified text value, with an optional culture parameter to customize the conversion.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Text.Proper(
   text as nullable text,
   optional culture as nullable text,
) as nullable text
ArgumentAttributeDescription
textThe string that will be transformed. This function adjusts the text so that the first letter of each word is capitalized, and the remaining characters are in lowercase.
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

Returns the result of capitalizing only the first letter of each word in text value text. All other letters are returned in lowercase. An optional culture may also be provided (for example, “en-US”).

Examples

You can provide a sentence as single argument to the Text.Proper function. Doing that capitalizes each words in the sentence.

// Output: "Old Mcdonald Had A Farm, Hiahiahoo"
Text.Proper( "old MCDonald Had A FArm, HiaHiAHOO" )

Some languages treat capitalization differently than others. Take for example the following example.

// Output: "You And I Are Different"
Text.Proper( "You and i are different", "en-US")

In the English language the word “i” is capitalized to “I”. However, the turkish alphabet treats this letter differently.

// Output: "You And İ Are Different"
Text.Proper( "You and i are different", "tr-TR")

In Turkish alphabet the letter “İ” is the capital version of “i”. So depending on your needs, you can use the relevant culture-code for capitalizing words.

Learn more about Text.Proper in the following articles:

Other functions related to Text.Proper are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/text-proper
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.