We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formatting and cleansing raw data

Anmol_Mehrotra
6 - Meteoroid

Hi,

I am working on a raw data set with the following example data.

 

DataEmail
  
Header A 
Data Aabc@example.com
Data Bdef@example.com
  
Header B 
Data B.Axyc@example.com
Data B.Bedf@example.com
Data B.Cedf@example.com
  
Header C 
Data C.Ahgj@example.com

 

However, I want the data to be changed a bit so the headers are along the actual data. Something like below:

 

New ColumnDataEmail
Header AData Aabc@example.com
Header AData Bdef@example.com
Header BData B.Axyc@example.com
Header BData B.Bedf@example.com
Header BData B.Cedf@example.com
Header CData C.Ahgj@example.com

 

I need the headers to be beside the data columns so I can have carry it after a join tool which is using Data column as the unique value to join two files.

 

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

3 REPLIES 3
SPetrie
13 - Pulsar

Here is one possible way to do it.

example.PNG

JBLove
10 - Fireball

@Anmol_Mehrotra -

 

This is a good use for a Multi Row formula tool.  I used the Multi Row Formula to create the "New Field".  And then I use a filter tool to remove the rows where the New Field was blank.

 

Here's the Multi Row expression:  IF IsEmpty(TRIM([Data])) THEN ""
ELSEIF !IsEmpty(TRIM([Row-1:Data])) AND IsEmpty(TRIM([Row-1:Email])) THEN [Row-1:DATA] ELSE [Row-1:New Field] ENDIF

Anmol_Mehrotra
6 - Meteoroid

This worked for me. Thank you so much for the help

Labels
Top Solution Authors