cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
kocemba
Level II

Merge two rows of data

Hi

 

I have a list of patient ID's, diagnosis and diagnosis date. I have it like this right now:

IDLabelRow 1Row 2Row 3Row 4Row 5Row 6Row 7Row 8
1Diagnosisxxyyzzxx
1Diagnosis date01/01/200001/01/200101/01/200201/01/200301/01/200401/01/200501/01/200601/01/2007
2Diagnosis

x

xyyzzxx
2Diagnosis date01/01/200001/01/200101/01/200201/01/200301/01/200401/01/200501/01/200601/01/2007

 

I am trying to get it like this:

IDDiagnosis datediagnosisDiagnosis datediagnosisDiagnosis datediagnosisdiagnosis dateDiagnosisdiagnosis datediagnosis
101/01/2000x01/01/2001x01/01/2002y01/01/2003y01/01/2004z
201/01/2000x01/01/2001x01/01/2002y01/01/2003y01/01/2004z

 

Can you help?

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
KarenC
Super User (Alumni)

Re: Merge two rows of data

You can use the table split:

 

Tables > Split

 

Then Split By = Label

Split Coumns = Rows

Group = ID

 

I like to click the "Keep dialog open" option as it often takes a couple of rounds to get things just right.

View solution in original post

txnelson
Super User

Re: Merge two rows of data

You can do this by using the Split Platform

     Tables==>Split

split1.PNG

Which creates the following output data table

split2.PNG

 

The order of the rows is based upon the alphabetical order of the Label column.  So if you want to change that you can use the Value Ordering Column Property to change the order

split3.PNG

 

And then the final data table will look like:

split4.PNG

Jim

View solution in original post

4 REPLIES 4
KarenC
Super User (Alumni)

Re: Merge two rows of data

You can use the table split:

 

Tables > Split

 

Then Split By = Label

Split Coumns = Rows

Group = ID

 

I like to click the "Keep dialog open" option as it often takes a couple of rounds to get things just right.

kocemba
Level II

Re: Merge two rows of data

Thank you KarenC!
txnelson
Super User

Re: Merge two rows of data

You can do this by using the Split Platform

     Tables==>Split

split1.PNG

Which creates the following output data table

split2.PNG

 

The order of the rows is based upon the alphabetical order of the Label column.  So if you want to change that you can use the Value Ordering Column Property to change the order

split3.PNG

 

And then the final data table will look like:

split4.PNG

Jim
kocemba
Level II

Re: Merge two rows of data

Thank you txnelson!