cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Group data in one column but sort by another

Hi! 

 

I have been trying to organize a set of data to group by the device column (ie all the a's are together, b's, etc), but sort them by the percent failed (ie c, F2 would be first followed by the rest of the c rows, then b, F3, and so on) similar to the picture below. When I sort by percent I get the left most table, by device I get the middle table, but I am not sure how to combine the filtering to get the right most table. 

 

Any insights would be greatly appreciated! Thank you.

 

SampleIguana839_0-1671548575093.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Group data in one column but sort by another

Those tables seem to be from Excel, is a JMP or Excel question?

If JMP first sort by Percentage column in Descending order and then sort again by Device in descending order.

 

Starting point:

jthi_0-1671549422721.png

Sort Descending by Column3

jthi_1-1671549437157.png

Sort Descending by Column1

jthi_2-1671549460884.png

 

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Group data in one column but sort by another

Those tables seem to be from Excel, is a JMP or Excel question?

If JMP first sort by Percentage column in Descending order and then sort again by Device in descending order.

 

Starting point:

jthi_0-1671549422721.png

Sort Descending by Column3

jthi_1-1671549437157.png

Sort Descending by Column1

jthi_2-1671549460884.png

 

 

-Jarmo

Re: Group data in one column but sort by another

Sorry for the confusion I was using generic information in an excel table as an example. That does work, but only if the 'device' column (column 1) with the highest percentage is also at the end of the list. If a 'b' row had the percent highest value, how could you sort it then? 

 

In this case the descending sort would bring the 'c' group to the top and not have the highest percentage shown first.

 

For example: 

SampleIguana839_1-1671550650769.png

 

 

hogi
Level XI

Re: Group data in one column but sort by another

Then you could "cheat" and pre-define the device order:

hogi_0-1671552777145.png

 

or add a column with the additional info:

hogi_1-1671552909528.png

By the way, you can also sort in a single step by first selecting both columns and then clicking on sort/descending.
The columns are used from left to right, so you have to place the main category column left of the subcategory column:

hogi_2-1671553004772.png