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
trevorphysics
Level II

Split Data Table Issue

I am having some difficulty splitting tables and keeping the data grouped together correctly. Here is sample data:

 

V1I1Test CountSweep Name
001Forward
0.10.11Forward
0.20.21Forward
0.30.31Forward
0.40.41Forward
0.50.51Forward
0.60.61Forward
0.70.71Forward
0.80.81Forward
0.90.91Forward
111Forward
1.11.11Forward
1.21.21Forward
002Forward
0.10.12Forward
0.20.22Forward
0.30.32Forward
0.40.42Forward
0.50.52Forward
0.60.62Forward
0.70.72Forward
0.80.82Forward
0.90.92Forward
112Forward
1.11.12Forward
1.21.22Forward
001Reverse
0.1-0.11Reverse
0.2-0.21Reverse
0.3-0.31Reverse
0.4-0.41Reverse
0.5-0.51Reverse
002Reverse
0.1-0.12Reverse
0.2-0.22Reverse
0.3-0.32Reverse
0.4-0.42Reverse
0.5-0.52Reverse
0.6-0.62Reverse
0.7-0.72Reverse
0.8-0.82Reverse

 

When I split the table...

dt << Split(
	Split By( :Sweep Name ),
	Split( :V1, :I1 ),
	Output Table( "Split Table" ),
	Sort by Column Property

I get the following table:

 

Test CountV1 ForwardV1 ReverseI1 ForwardI1 Reverse
10000
10.10.10.1-0.1
10.20.20.2-0.2
10.30.30.3-0.3
10.40.40.4-0.4
10.50.50.5-0.5
10.600.60
10.70.10.7-0.1
10.80.20.8-0.2
10.90.30.9-0.3
110.41-0.4
11.10.51.1-0.5
11.20.61.2-0.6
200.70-0.7
20.10.80.1-0.8
20.2 0.2 
20.3 0.3 
20.4 0.4 
20.5 0.5 
20.6 0.6 
20.7 0.7 
20.8 0.8 
20.9 0.9 
21 1 
21.1 1.1 
21.2 1.2 

 

JMP ends up aligning test count incorrectly for all the reverse data because the number of data points is not necessarily equal between any test.

 

 

What I want is the following:

 

Test CountV1 ForwardV1 ReverseI1 ForwardI1 Reverse
10000
10.10.10.1-0.1
10.20.20.2-0.2
10.30.30.3-0.3
10.40.40.4-0.4
10.50.50.5-0.5
10.6 0.6 
10.7 0.7 
10.8 0.8 
10.9 0.9 
11 1 
11.1 1.1 
11.2 1.2 
20000
20.10.10.1-0.1
20.20.20.2-0.2
20.30.30.3-0.3
20.40.40.4-0.4
20.50.50.5-0.5
20.60.60.6-0.6
20.70.70.7-0.7
20.80.80.8-0.8
20.9 0.9 
21 1 
21.1 1.1 
21.2 1.2 

 

 

I have played around with the group option with split data table but it always seems to drop off data. For example, if I group by test count, it only gives me a single row per test count and seems to pick whatever the last value is in that test count for forward and reverse.

 

Hopefully this all makes sense. Thanks in advance for the assistance.

1 ACCEPTED SOLUTION

Accepted Solutions
frank_wang
Level IV

Re: Split Data Table Issue

Hi

My solution include two steps. Transpose then Split.

Before table change, I create a new col named "Tag" with formula

Current Data Table() << New Column( "Tag",
formula( Col Rank( :Test Count, :Test Count, :Sweep Name ) )
);

Transpose data table

Current Data Table() << Transpose(
	columns( :V1, :I1 ),
	By( :Test Count, :Tag ),
	Label( :Sweep Name ),
	Output Table( "Transpose of Untitled" )
);

Then split as last step

Data Table( "Transpose of Untitled" ) << Split(
	Split By( :Label ),
	Split( :Forward, :Reverse ),
	Sort by Column Property
);

Final table like this

frank_wang_0-1660007325378.png

Have a good day!

心若止水

View solution in original post

2 REPLIES 2
frank_wang
Level IV

Re: Split Data Table Issue

Hi

My solution include two steps. Transpose then Split.

Before table change, I create a new col named "Tag" with formula

Current Data Table() << New Column( "Tag",
formula( Col Rank( :Test Count, :Test Count, :Sweep Name ) )
);

Transpose data table

Current Data Table() << Transpose(
	columns( :V1, :I1 ),
	By( :Test Count, :Tag ),
	Label( :Sweep Name ),
	Output Table( "Transpose of Untitled" )
);

Then split as last step

Data Table( "Transpose of Untitled" ) << Split(
	Split By( :Label ),
	Split( :Forward, :Reverse ),
	Sort by Column Property
);

Final table like this

frank_wang_0-1660007325378.png

Have a good day!

心若止水
trevorphysics
Level II

Re: Split Data Table Issue

View more...
 

That's very clever and works perfectly. Thank you!