Alteryx Designer Desktop Discussions

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

Transpose Rows into Columns and keep Data in a concatenated row

afmathieson
5 - Atom

I am looking to take the following (see image below):

afmathieson_0-1606327715767.png

Note: F2 is really the column header Title/Desc (except for the @P1@ which is a record indicator). The rows within the Person's record are also not in a standard order (In the first overall record, Gender is the first row and in the second overall record the Gender is the 4th row).

Also, an overall person's record can vary in the number of rows for that individual (i.e. a living person vs. one that has passed and therefore has death information in additional rows).

 

And get the following results...

Record #P#SEXBIRTBIRT DATEBIRT PLACNAMEFAMCFAMSADOPADOP DATEADOP PLACDEATDEAT DATEDEAT PLAC
1@P1@M 1-Jun-66Lunenburg, Lunenburg, Nova Scotia, CanadaAndrew Foster /Mathieson/@F2@@F1@      
2@P2@F 2-Aug-09Plano, Denton, Texas, USATaylor Lynn /Mathieson/@F1@  2-Aug-09Plano, Denton, Texas, USA   
3@P3@M 20-Nov-05Dallas, Dallas, Texas, USADrake Alan /Mathieson/@F1@       
4@P4@M 12-Jul-04Dallas, Dallas, Texas, USAPrescott Foster /Mathieson/@F1@       
5@P5@M 8-Mar-02Dallas, Dallas, Texas, USAHunter Hart /Mathieson/@F1@       
6@P6@F 27-Dec-69Dallas, Dallas, Texas, USAAngel Claudine /Generes/@F1@       
7@P7@F 2-Aug-42Saint John, Saint John, New Brunswick, CanadaCarol Ann /Foster/@F5@@F2@   Passed away at Bethany Lodge as a result of complications due to Alzheimer's.19-Aug-20Unionville, York, Ontario, Canada
3 REPLIES 3

Hi @afmathieson 

 

Is this what you are looking for? if not, it may be helpful to share your input file - if possible. Cheers!

christine_assaad_0-1606334147941.png

 

afmathieson
5 - Atom

Attaching the excel data input file...

afmathieson
5 - Atom

Thanks Christine,

 

I will take a look at your solution...

Labels