Cheat Sheets/Power BI/TRIM
DAX function

TRIMDAX function reference

Remove extra spaces.

Syntax

dax
TRIM(<text>)

Examples

dax
TRIM([Name])
Trimmed text
dax
FILTER(Customer, TRIM(Customer[Name]) <> Customer[Name])
Finds rows where the source data has leading/trailing or doubled internal whitespace
dax
LOOKUPVALUE(Rate[USD], Rate[CurrencyCode], TRIM(UPPER(Sales[CurrencyCode])))
Normalizes a lookup key before matching, guarding against messy source data

Common mistakes & gotchas

Related DAX functions

From Text

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet