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

Group multiple column

Hi,

 

I'm novice in JMP. Starting to learn JMP. I'm trying to group a column and count the number of row.

Below is the example to clarify my question.  Basically i have 4 unit tested with different pattern. Each pattern will output failure.

How can i group them based on pattern. Any help will be appreciated. Thanks

 

Example raw data:

 TEST ATEST A FAIL OUTPUTTEST BTEST B FAIL OUTPUTTEST CTEST C FAIL OUTPUT
UNIT AA0 PATTERNA1    
UNIT BA0 PATTERNA2B0 PATTERNB1C0 PATTERNC1
UNIT CA0 PATTERNA1B1 PATTERNB2  
UNIT D  B1 PATTERNB3C0 PATTERNC2

 

Output needed:

A0 PATTERNA12
 A21
B0 PATTERNB11
B1 PATTERNB21
 B31
C0 PATTERNC11
 C21

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Group multiple column

The solution is to stack the data and then to use the Tabulate Platform to produce the required output.

Starting with your data table

txnelson_0-1671113240882.png

Go to Tables=>Stack

Fill out the Dialog Box as shown

txnelson_1-1671113399509.png

Click on OK and it will give you the table as previewed

Now go to Analyze=>Tabulate

txnelson_2-1671113526314.png

Drag the Data column to the Drop Zone for Rows

Drag the Data 2 to the far edge of the above dragged Data column and you will have the report you want

txnelson_3-1671113749346.png

 

Jim

View solution in original post

GregF_JMP
Staff

Re: Group multiple column

Hello, welcome to JMP.

The table operations are very powerful and will help in this instance.  The icons on the Table menu items help describe the actions that reshape data.

There are a number of ways to accomplish your objective, but here is one.

1) Your example data should have column headers before moving to JMP, assume First column is called "Part" in upper left cell
  "Copy", "Paste with Column headers" into a blank JMP data table

2) Execute the Table Operation "Stack"  (New in JMP 17, the preview window helps with real time feedback of potential output)

  • Select all Columns except "Part", press "stack columns" button to select six columns with test information to be stacked
  • Check "multiple series stack", set "number of series" to 2
  • De-select "Contiguous"
  • Check "Eliminate Missing Rows" (optional- it's easy to delete the non-failing test items later)
  • Optionally, for non-stacked columns you can "keep all" in case Part/Unit ID will be helpful for other analysis.
  • Press Ok

3) On the table generated by the "Stack" operation, execute the Table Operation "Summary"

  • Select Columns Data and Data 2, Press "Group" button so both columns are listed in the group box.  This will group all combinations of these values. (control-click to select multiple items or do in two steps)
  • Uncheck "Link to original data table"
  • Press OK

Your requested output 

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Group multiple column

The solution is to stack the data and then to use the Tabulate Platform to produce the required output.

Starting with your data table

txnelson_0-1671113240882.png

Go to Tables=>Stack

Fill out the Dialog Box as shown

txnelson_1-1671113399509.png

Click on OK and it will give you the table as previewed

Now go to Analyze=>Tabulate

txnelson_2-1671113526314.png

Drag the Data column to the Drop Zone for Rows

Drag the Data 2 to the far edge of the above dragged Data column and you will have the report you want

txnelson_3-1671113749346.png

 

Jim
GregF_JMP
Staff

Re: Group multiple column

Hello, welcome to JMP.

The table operations are very powerful and will help in this instance.  The icons on the Table menu items help describe the actions that reshape data.

There are a number of ways to accomplish your objective, but here is one.

1) Your example data should have column headers before moving to JMP, assume First column is called "Part" in upper left cell
  "Copy", "Paste with Column headers" into a blank JMP data table

2) Execute the Table Operation "Stack"  (New in JMP 17, the preview window helps with real time feedback of potential output)

  • Select all Columns except "Part", press "stack columns" button to select six columns with test information to be stacked
  • Check "multiple series stack", set "number of series" to 2
  • De-select "Contiguous"
  • Check "Eliminate Missing Rows" (optional- it's easy to delete the non-failing test items later)
  • Optionally, for non-stacked columns you can "keep all" in case Part/Unit ID will be helpful for other analysis.
  • Press Ok

3) On the table generated by the "Stack" operation, execute the Table Operation "Summary"

  • Select Columns Data and Data 2, Press "Group" button so both columns are listed in the group box.  This will group all combinations of these values. (control-click to select multiple items or do in two steps)
  • Uncheck "Link to original data table"
  • Press OK

Your requested output 

Re: Group multiple column

Thanks

I have tried it works on 3 or 4 pattern.

But when i include all my pattern column around 40++ with it output also around 40++. it will pop up this error.

I tried to make all my column to ordinal or nominal but not able to solve this one.

Any idea why it produce such error?

ConcurrentStudy_0-1671156486042.png

 

txnelson
Super User

Re: Group multiple column

If you change all of the columns to character, the stack will then work.

Jim