cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
aallman
Level III

Losing Unique Values When Doing Table Split

I have a table set up like the following. I want to split the Service column by Type so that the result looks like the second table below. However, when I do this, I end up losing a lot of unique values of ID. For reference I have 15,047 unique IDs and 78,276 rows in my raw data table. Of these 78,276 services, only 963 are Type2. When I do the table split, the result gives me a table of 77,313 rows which seemed right at first because the math works out. However in the split table there are only 14,910 unique IDs .

 

Why is this happening and how can I stop it? Something to note, not all ID's have Type2 values (the ones that do will only ever have 1 Type2 value) but this does not seem to be related to which values of ID are being lost. 

 

I really only need the services split into the 2 type columns, I don't care how they are arranged as far as which rows for that ID have the service listed in Type2 (for example in the desired result table below, it is okay to have it as I have shown but it could also have an extra row for ID 1 that is blank in Type1 and shows the service in Type2 rather than listing the Type2 service in row 1. I don't know if that helps make this easier?)

 

Example Data:

IDProductServiceType
1Product1ExampleService1Type1
1Product1ExampleService2Type1
1Product1ExampleService3Type2
2Product2ExampleService1Type1
2Product2ExampleService4Type1
3Product3ExampleService5Type1
3Product3ExampleService6Type2

 

Desired result:

IDProductType1Type2
1Product1ExampleService1ExampleService3
1Product1ExampleService2 
2Product2ExampleService1 
2Product2ExampleService4 
3Product3ExampleService5ExampleService6

 

I am using JMP 16.0.0 on Windows 10

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Losing Unique Values When Doing Table Split

If I remember correctly this is by design (which is a bit annoying). JMP17 seems to have new warning message which I think is related to this:

jthi_0-1668624890738.png

 

One option to avoid this can be to add extra column to your original data table which has supporting running number which you can use while splitting (JMP17 has preview)

jthi_1-1668625044090.png

In this case I used following formula for Uniq

 

Col Cumulative Sum(1, :Type, :ID, :Product)

After removing Uniq column

ID Product Type1 Type2
1 Product1 ExampleService1 ExampleService3
1 Product1 ExampleService2
2 Product2 ExampleService1
2 Product2 ExampleService4
3 Product3 ExampleService5 ExampleService6

 

See also discussion hereDoes Split-platform work correctly? 

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Losing Unique Values When Doing Table Split

If I remember correctly this is by design (which is a bit annoying). JMP17 seems to have new warning message which I think is related to this:

jthi_0-1668624890738.png

 

One option to avoid this can be to add extra column to your original data table which has supporting running number which you can use while splitting (JMP17 has preview)

jthi_1-1668625044090.png

In this case I used following formula for Uniq

 

Col Cumulative Sum(1, :Type, :ID, :Product)

After removing Uniq column

ID Product Type1 Type2
1 Product1 ExampleService1 ExampleService3
1 Product1 ExampleService2
2 Product2 ExampleService1
2 Product2 ExampleService4
3 Product3 ExampleService5 ExampleService6

 

See also discussion hereDoes Split-platform work correctly? 

 

-Jarmo