How to remove leading or trailing characters

Sueann See
Sueann See Experian Super Contributor
edited December 2023 in Tips and tricks

Here's a simple example of how you can remove leading or trailing characters.

Assume you have loaded a dataset, treating all columns as alphanumeric as follows:

image.png


To remove the leading zeroes from Customer No, apply the Trim function in a Transform step.

image.png


To remove the trailing colon symbol from Customer ID, use the Trim function in a Transform step, this time with Trim trailing character checked on.

image.png


You can apply the transformations on the existing columns or create new columns that contain the transformed values.


I've created new columns for the transformed values as follows:

image.png


Sample results as follows:

image.png


Tagged: