Alteryx Designer Desktop Discussions

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

Group similar columns by name to clean data

Anmol_Mehrotra
6 - Meteoroid

Hi

I am looking to clean data before it could be added to the final output. Currently the raw data is following:

 

HeaderValue 1Value 2Value 3Value 4
ABC123 23XY 
ABC 2543 3u5
DEF  9786 
DEF342t665h  
DEF   <32
GHI    

 

However, I want to clean the data and have it appear something like the following so it can be further joined properly:

 

HeaderValue 1Value 2Value 3Value 4
ABC123254323XY3u5
DEF342t665h9786<32
GHI    

 

How can I achieve this? Can anyone please help me out?

 
3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Anmol_Mehrotra 
We use the combination of Transpose and Cross Tab as below.

The additonal part is for the Null row.

1024-Anmol_Mehrotra.png

adavis1
5 - Atom

This was a bit tougher than I thought it would be.  I had to get rid of the null values, group it by header and concatenate each value in the summarize tool.  This leaves you with some commas (added by alteryx in the concatenation).  It is worth mentioning that this solution will not work well if you have more than one value per header.  For example, if ABC value 1 was 456 on one line and 123 on the other, you would get 456,123.  Then a formula tool is need to get rid of the commas and place the result in a new column as follows: Replace([Concat_Value 2], ",", "").  After that, I just got rid of the concat columns and I was done.  I feel like there might be a cleaner way to do this, but this works.

 

 

 

flying008
15 - Aurora

Hi, @Anmol_Mehrotra 

 

FYI.

录制_2024_10_24_10_44_04_946.gif

Labels
Top Solution Authors