<!-- https://learnsql.cpetoday.com/functions/m/text-proper -->
# Text.Proper

Language: Power Query M
Category: Text
Syntax: Text.Proper(text as nullable text) as nullable text
Summary: Capitalizes the first letter of each word and lower cases the rest.
Returns: The text in title style, or null when the input is null.
Level: Beginner
Related: Text.Upper, Text.Lower, Text.Trim, Text.Clean, Text.Replace

## 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
- text: the value to convert. There are no other 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.

```powerquery
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
- It can get some names wrong. "LLC" becomes "Llc", and names such as "McDonald" become "Mcdonald". Use Text.Upper on known abbreviations, or replace them afterwards.
- It is for display, not matching. Use Text.Lower to build a key.
- Hyphenated words and words after an apostrophe may not come out the way you expect. Check a sample before you publish the report.
- Null in gives null out.
## 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.
