Courses / Power Query (Get & Transform)
15. Trim and Clean text (Text.Trim, Text.Clean)
Removing whitespace and non-printable characters from text columns using Text.Trim and Text.Clean.
Power Query M
Trim and Clean text (Text.Trim, Text.Clean)
Functions that remove unwanted characters from the start/end of text (Text.Trim) and strip non-printable control characters (Text.Clean).
"I want rows that look clean in Excel—no hidden spaces or invisible junk breaking my joins and filters."
Text.Trim removes characters (usually whitespace) from the start and end of a text value; Text.Clean removes non-printable control characters (ASCII codes 0–31 and DEL) from a text value.
"I want rows that look clean in Excel—no hidden spaces or invisible junk breaking my joins and filters."
Text.Trim removes characters (usually whitespace) from the start and end of a text value; Text.Clean removes non-printable control characters (ASCII codes 0–31 and DEL) from a text value.