The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

How to use trim in Alteryx

DouglasEKL
Meteor

Hi,

I have problem in runnnig the Trim command in Alteryx for the following samples of Trim functions used in Excel.

 

=IF(TRIM(UPPER(C4))<>"",TRIM(UPPER(C4)),"noAccount")
=IF(TRIM(UPPER(C8))<>"",TRIM(UPPER(C8)),"noAccount")
=IF(TRIM(TEXT(A8,"0"))<>"0",TRIM(TEXT(A8,"0")),"noNumber")

 

Appreciate someone can help me. Thank you.

 

Regards

Douglas

4 ANTWORTEN 4
mst3k
Bolide

trim in Alteryx should work the same as excel, removing both left and right whitespace. in Alteryx, you want to use uppercase() instead of upper()

pdave87
Bolide

Hi Douglas,

 

Trim function in Alteryx will return the value after removing unwanted character specified in quotes "" in the expression editor. Let me know if below expression returns the expected value in the output for your use case.

 

Regards,

Pratik

 

pdave87_0-1632123085427.png

 

Priyanka_Ms
Asteroid

Hi Douglas,

 

You can use a data cleansing tool and set the configuration "Remove unwanted characters - Leading and Trailing spaces" as checked.

 

Also, you can use a formula tool and use the function Trim()

Like Trim(C4)

 

To convert it to upper case, use the formula Uppercase(), like Uppercase(C4)

 

Use a " If "  statement for processing conditions.

 

You can refer the attachment too.

 

pdave87
Bolide

@Priyanka_Ms and @mst3k thanks

 

@DouglasEKL here you go..

 

pdave87_1-1632124115740.png

 

 

Beschriftungen
Top-Lösungs-Autoren