Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to use trim in Alteryx

DouglasEKL
7 - 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 REPLIES 4
mst3k
11 - 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
11 - 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
8 - 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
11 - Bolide

@Priyanka_Ms and @mst3k thanks

 

@DouglasEKL here you go..

 

pdave87_1-1632124115740.png

 

 

Labels