Power Fx function
Trim — Power Fx function reference
Trim ends + collapse inner spaces.
Syntax
powerfx
Trim( Text )
Examples
powerfx
Trim(" a b ")→ "a b"
powerfx
Trim(txtSearch.Text) <> ""
powerfx
Filter(Staff, Trim(Lower(Name)) = Trim(Lower(txtSearch.Text)))
Common mistakes & gotchas
- Trim also collapses repeated interior spaces. TrimEnds touches only the ends.
- Trim collapses repeated interior spaces down to one, in addition to trimming the ends — use TrimEnds if interior spacing needs to be preserved exactly.
- Trim removes the space character only, not tabs or line breaks.
Related Power Fx functions
From Text