Free Trial

Alteryx Designer Desktop Discussions

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

Display only 1 Value

JDong
8 - Asteroid

Hello Team,

 

I have the following data in a column 'Fruits'

 

Fruits
Oranges, Oranges
Apple,Apple,Apple
Kiwi
Grapes,Grapes, Grapes

 

This data is part of a large table and this is from the end outcome.

 

Is there a way I can retain just one value for each row in the column.

 

Expected outcome is :

 

Fruits
Oranges
Apple
Kiwi
Grapes

 

Thanks

7 REPLIES 7
Emil_Kos
17 - Castor
17 - Castor

Hi @JDong,

 

I have created a workflow for you:

 

 

Emil_Kos_0-1604479212854.png

And the output is:

 

Emil_Kos_1-1604479226284.png

If this is something helpful please mark my post as a solution!

Good luck!

 

jdunkerley79
ACE Emeritus
ACE Emeritus

I would suggest a formula of:

REGEX_Replace([Fruits], ",.*", "")

 

This will delete everything from the first comma on. 

JDong
8 - Asteroid

This works too thanks !

 

I also used a REGEX formula to achieve this result

 

TRIM(REGEX_Replace([Concat], '\b(.+),(?=.*\b\1,?)', ''))

 

@jdunkerley79  This trims the spaces as well

grazitti_sapna
17 - Castor

hi @JDong,

 

Here is another way of achieving the same output.

 

grazitti_sapna_0-1604479862602.png

 

Sapna Gupta
atcodedog05
22 - Nova
22 - Nova

Hi 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1604479863496.png

Workflow:

atcodedog05_1-1604479878326.png

Parse mode

([[:alpha:]]+).*

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @JDong 

 

If you dont have leading spaces(i,e before the text). I dont think trim is really required.

 

Anyways glad to hear it got solved.

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

Emil_Kos
17 - Castor
17 - Castor

Hi @JDong,


Thank you for marking my answer as a solution.

 

Good luck!

Labels
Top Solution Authors