Subscribe Bookmark RSS Feed

Including all rows when splitting

jamiesupica0

Community Trekker

Joined:

Jul 15, 2016

I have a dataset where class is broken into "Initial" and "Refined" groups.  There are also subclasses within each group...

image.png

 

I want to split the table so the two groups are in two different columns like so

image.png

 

However, when I tried splitting the table as shown below I only get one instance of each Item Class.

image.png

 

Question:  How can I split this table so that all values are represented?

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

You can do it by adding a new Grouping column, which allows the matching of the Subclass levels(number).  I just added a new column "Column 4" and gave it the formula:

Right(:Subclass, 1)

I then used it in the Tables==>Split platform

splitcolumn4.PNG

and got the results data table

splitcolumn42.PNG

Jim
jamiesupica0

Community Trekker

Joined:

Jul 15, 2016

Thanks so much for your response Jim.

 

Unfortunately this workaround won't get what I need.  There are 5000+ rows in the dataset and the Subclasses are all characters (the numbers I included were as an example only).

 

I might be able to fenagle an index column to achieve your example below but I was hoping I was just overlooking a box that needed to be checked.

 

My JSL writing skills are limited so don't waste your time coming up with a lengthy code snippit as a solution :)

 

Thanks again.

txnelson

Super User

Joined:

Jun 22, 2012

I assumed the Right() function would not be the miracle cure for your problem.  The point of the extra column is simply to just come up with a column that allows for the grouping requried for your data.  If you think in those terms, you may find a simple solution in your data.

Jim