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 textReturns
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
- Lowercases the rest of each word, so 'McDonald' becomes 'Mcdonald'.
Common mistakes
- Applying it to codes or IDs where case is meaningful.
- Using it for keys before a merge when the other table uses a different case rule.
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
- beginner~8 minFree
Reorder steps so cleaning happens before grouping (kite shop)
The query groups regions before cleaning them, so " north" and "North" are counted separately. Fix the step order.
- intermediate~7 minFree
Fix a step that silently skips the cleaning step (kite shop)
The query runs, but its totals are split across " north" and "North": the Group step reads Source instead of the cleaned step.
- intermediate~9 minPro
Clean every column name, including future ones (survey)
Trim and capitalise all column headers with one dynamic step instead of renaming each column by hand.
- advanced~20 minPro
Project: revenue by regional manager from a raw export (kite shop)
From a messy CSV export and a manager list, produce completed revenue per regional manager, rounded to cents and sorted.
Learn more
- Trim, clean and capitalise text lesson
- Power Query data cleaning recipes for messy exports guide
- Power Query text functions cheat sheet (tested) guide
Related functions
Official documentation: Text.Proper on Microsoft Learn.