Power QueryExercises

Text.Proper

Text function · By Tahir Nas · Examples run in our simulator · Published · Updated

Capitalises the first letter of each word.

When to use it

Use it to tidy person names, cities and other labels typed in inconsistent case, usually right after trimming. Check the result for names with internal capitals (McDonald, DeVries), which it lowercases, and leave codes alone.

Syntax

Text.Proper(text as nullable text, optional culture as nullable text) as nullable text

Returns

The text in proper case.

Example

Text.Proper("aMARA okafor")

Result

Amara Okafor

Example: clean a name column

Trim first, then fix case, in one transform.

Text.Proper(Text.Trim("  ana DE souza "))

Result

Ana De Souza

Both results are produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M, and checked on every build.

Good to know

Common mistakes

The matching command in Excel

Excel for Windows
Transform > Format > Capitalize Each Word
What you see
The command runs on every value of the selected text column.

Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Add a column based on a data type (Power Query) (Microsoft Support).

Exercises that use Text.Proper

Learn more

Related functions

Official documentation: Text.Proper on Microsoft Learn.