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.
RESUELTAS

How to use trim in Alteryx

DouglasEKL
Meteoro

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 RESPUESTAS 4
mst3k
Bólido

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
Bólido

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
Asteroide

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
Bólido

@Priyanka_Ms and @mst3k thanks

 

@DouglasEKL here you go..

 

pdave87_1-1632124115740.png

 

 

Etiquetas
Autores con mayor cantidad de soluciones