- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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:
ID | Product | Service | Type |
1 | Product1 | ExampleService1 | Type1 |
1 | Product1 | ExampleService2 | Type1 |
1 | Product1 | ExampleService3 | Type2 |
2 | Product2 | ExampleService1 | Type1 |
2 | Product2 | ExampleService4 | Type1 |
3 | Product3 | ExampleService5 | Type1 |
3 | Product3 | ExampleService6 | Type2 |
Desired result:
ID | Product | Type1 | Type2 |
1 | Product1 | ExampleService1 | ExampleService3 |
1 | Product1 | ExampleService2 | |
2 | Product2 | ExampleService1 | |
2 | Product2 | ExampleService4 | |
3 | Product3 | ExampleService5 | ExampleService6 |
I am using JMP 16.0.0 on Windows 10
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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:
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)
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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:
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)
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?