cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
ERoderz
Level III

Split Function overwritting values?

I'm attempting to split this table to make it easier for analysis, but data is being overwritten.

 

Most rows in this source table (DT2) only have one set of "Markers" (the column in the picture below, not the JMP marking function). But, the CD3+ has 2 sets of 3, totaling 6 distinct data points, as shown in the picture below with yellow (with the same lot number and instruments). I would expect the split function (dt3 = dt2 << Split( Split( :Results ), Split By( :Marker ), Group( :Lot Number, :Instrument ));) to treat the additional set separately and add 6 lines in the new Table, but it overwrites the first set and only shows 3.

 

Is there a special function that would work better? A line of code I'm missing in the split? or a work around? Any help would be greatly appreciated!!!!

 

ERoderz_0-1616546602725.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Split Function overwritting values?

I created a new column called "count" using the following formula

curmark = :Marker;
curlot = :Lot Number;
curins = :Instrument;
currow = Row();
number = N Rows(
	Current Data Table() << get rows where(
		:Marker == curMark & :Lot Number == curlot & :Instrument == curins & Row() < currow
	)
) + 1;

I then used it as an additional Grouping variable

 stack1.PNG

and got the following results

stack2.PNG

Jim

View solution in original post

6 REPLIES 6
Thierry_S
Super User

Re: Split Function overwritting values?

Hi,
I think that you problem is that you have multiple rows with the same combination of Marker, Lot Number, and Instrument: JMP does not know that these are actually different items so it tends to take the first instance of the specific combination of columns to populate the Split Table.
Hence, you will need to create an identifier that distinguish between rows 13 - 15 and rows 22 - 24 in your example. Let me know if you need help with the creation of column formula that will create such identifiers.
Best,
TS
Thierry R. Sornasse
ERoderz
Level III

Re: Split Function overwritting values?

That would make sense. So add an additional column like "Data Point #" or something. What formula did you have in mind TS?
Georg
Level VII

Re: Split Function overwritting values?

I think you also need to add the col "Marker" to the group role. Then you get more rows.

 

Georg_0-1616565429942.png

 

Georg
ERoderz
Level III

Re: Split Function overwritting values?

That explodes the data table and doesn't contain the format I need. Most cells now are empty with that approach.
txnelson
Super User

Re: Split Function overwritting values?

I created a new column called "count" using the following formula

curmark = :Marker;
curlot = :Lot Number;
curins = :Instrument;
currow = Row();
number = N Rows(
	Current Data Table() << get rows where(
		:Marker == curMark & :Lot Number == curlot & :Instrument == curins & Row() < currow
	)
) + 1;

I then used it as an additional Grouping variable

 stack1.PNG

and got the following results

stack2.PNG

Jim
ERoderz
Level III

Re: Split Function overwritting values?

Thanks txnelson! That did the trick. Was able to drop that block into the existing script and it ran fine. Thanks!