Downloads
Power Query MTextBeginner

Text.Proper

Capitalizes the first letter of each word and lower cases the rest.

Syntax
Text.Proper(text as nullable text) as nullable text

Returns: The text in title style, or null when the input is null.

What it does

Vendor and customer names often arrive in capitals from one system and in lower case from another. Text.Proper gives each word a capital first letter, which makes a list readable for a report or a letter. It is a display step. Do not use it to build a match key, because it does not handle every name the way a person would.

Syntax and arguments

Example

A vendor master export has names keyed in capitals. The AP team wants the names in title case on the aged payables report.

let
    Vendors = #table(type table [Vendor = text], {{"ACME SUPPLY CO"}, {"blue harbor llc"}, {"northwind traders"}}),
    Titled = Table.TransformColumns(Vendors, {{"Vendor", Text.Proper, type text}})
in
    Titled

The names come back as "Acme Supply Co", "Blue Harbor Llc" and "Northwind Traders". The first letter of every word is a capital and the rest are lower case.

Example: a second, different use

Apply Text.Proper to a department name such as "accounts payable" to get "Accounts Payable" for a column heading.

Things to watch

In business terms

Aged payables, customer statements and board packs are read by people. Title case reads better than capitals, but a vendor's legal name on a remittance or a check should still be typed exactly as the vendor writes it, so keep the original column for that.

Related functions

All Power Query M functions · View as Markdown · M basics