Text.Trim

This function removes any blank spaces at the beginning or end of a text value and returns the modified text.

Syntax

Text.Trim(text as nullable text, optional trim as any) as nullable text

About

This function removes any blank spaces at the beginning or end of a text value and returns the modified text.

Explanation

Eliminate any extra spaces at the beginning and end of the text " a b c d ". In Power Query, use the function MText.Trim("     a b c d    ") to achieve this. The output will be "a b c d".