1. Calculation functions
  2. All functions
  3. Text functions
  4. TRIM

The TRIM function removes all leading and trailing spaces, and extra spaces between words in a text string.

For example, if text imported from an external system includes irregular spaces, you can use the TRIM function to remove the spaces.

Syntax

TRIM(Text)

Arguments

ArgumentData typeDescription
TextTextThe text to trim extra spaces from.

The TRIM function returns a text value.

Syntax example

TRIM(" Account  Summary ")

Calculation engine functionality differences

You cannot currently use the TRIM function in Polaris.

In the Classic Engine, you can.

Excel equivalent

TRIM(opens external page)

Examples

In this example, the Office locations line item contains the Las Vegas, London, and Melbourne values. The formula removes all irregular spaces from each value, and replaces extra spaces between words with single space characters.


AmericaEuropeAustralia
Office locationsLas
Vegas
 London     Melbourne
TRIM(Office locations)Las VegasLondonMelbourne

Disclaimer

We may update our documentation occasionally, but will only do so in a way that does not negatively affect the features and functionality of the Anaplan service.