cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
anna_717
Level II

How do I transpose multiple delimited columns

Hi,

I'm trying to split and transpose multiple pipe delimited columns and would appreciate some help in finding the most efficient way of doing this.

The table contains measurement values at X,Y location for a measurement type.

The number of measurements and X,Y locations can vary for each batch and date.

 

Example data and required output shown below.

 

Start table

BatchDateTypeXYValue
A101/06/2021L0 | 0 | 1 | 1 | 00 | 1 | 0 | 1 | 20.2 | 0.32 | 0.22 | 0.30 | 0.27
A101/06/2021M0 | -3 | 0 | 3 | 03 | 0 | 0 | 0 | -31.743 | 1.732 | 1.741 | 1.740 | 1.7
A201/06/2021L0 | -3 | 0 | 3 3 | 0 | 0 | 0 0.20 | 0.31 | 0.22 | 0.28 
A202/06/2021L0 | -3 | 0 | 3 | 03 | 0 | 0 | 0 | -30.20 | 0.31 | 0.23 | 0.28 | 0.23

 

 

Output

BatchDateXYLM
A101/06/2021000.21.741
A101/06/2021010.32 
A101/06/2021100.22 
A101/06/2021110.3 
A101/06/2021020.27 
A101/06/202103 1.743
A101/06/2021-30 1.732
A101/06/202130 1.74
A101/06/20210-3 1.7
A201/06/2021030.2 
A201/06/2021-300.31 
A201/06/2021000.22 
A201/06/2021300.28 
A202/06/2021030.2 
A202/06/2021-300.31 
A202/06/2021000.23 
A202/06/2021300.28 
A202/06/20210-30.23 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
anna_717
Level II

Re: How do I transpose multiple delimited columns

Hi txnelson, Thanks for taking the time to answer this.

Unfortunatley the output you get isn't what I'm looking for, but your use of the multiple series stack did start me off in the right direction.

I realised that I need to change the order of the columns in the multiple series stack and then do a split on the data3 column.

anna_717_0-1624008239990.png

gives

anna_717_1-1624008250172.png

then split on data 3

anna_717_2-1624008264174.png

gives required output:

anna_717_3-1624008272286.png

 

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How do I transpose multiple delimited columns

Your request is an easily solvable task

To turn the concatenated data into separate columns,

     Select the 3 Columns

     Go to

          Cols=>Utilities=>Text to Columns

           Enter the "|" as the delimiter column

           Click on OK

To transpose the columns go to (this is actually a stacking of the columns)

     Tables=>Stack

     Set up the dialog box like below

txnelson_0-1623946829774.png

Click OK and you will get

txnelson_1-1623946912192.png

 

 

Jim
anna_717
Level II

Re: How do I transpose multiple delimited columns

Hi txnelson, Thanks for taking the time to answer this.

Unfortunatley the output you get isn't what I'm looking for, but your use of the multiple series stack did start me off in the right direction.

I realised that I need to change the order of the columns in the multiple series stack and then do a split on the data3 column.

anna_717_0-1624008239990.png

gives

anna_717_1-1624008250172.png

then split on data 3

anna_717_2-1624008264174.png

gives required output:

anna_717_3-1624008272286.png