OpenBI Docs Buy

Text.Proper

A text with each word starting in a capital and the rest in small letters.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.Proper(text as nullable text, optional culture as nullable text) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
culturenullable text
optional
A culture's name, such as "tr-TR", for that language's own letter rules; left out, the query's culture. A name no culture has is an error.

Returns

nullable text. The text in title case; null when the text is null.

Remarks

  • Words in all capitals are lowered too: "OSLO SENTRUM" becomes "Oslo Sentrum".
  • A letter right after another letter is made small and any other letter a capital, so a letter after a dash, an apostrophe or a digit starts anew: "3rd" becomes "3Rd".

Examples

A name typed in small letters

Text.Proper("ola nordmann")
"Ola Nordmann"

An address in capitals

Text.Proper("STORGATA 12, OSLO")
"Storgata 12, Oslo"

A dash and an apostrophe

Text.Proper("anne-marie o'neil")
"Anne-Marie O'Neil"

Text.Upper, Text.Lower.

Last updated · OpenBI Studio 0.3.79