cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
user8421
Level II

How to Create a Subset Table of the Final Row of Data per Group

Hi!

Is there a way to automate the creation of a subset table such that this is the starting data table

GroupData1Data 2
A1A
A2T
A3C
B8F
B2R
C1E
C4G
C1O
C5E


And this is the subset table (the final row of each group)

GroupData1Data 2
A3C
B2R
C5E


Any help appreciated!  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: How to Create a Subset Table of the Final Row of Data per Group

I can see several ways to do this with JSL. Try this:

 

Names Default To Here( 1 );
dt = Current Data Table();
dt << Subset(
	Selected Columns( 0 ),
	Rows( dt << Get rows where( Col Max( Row(), :Group ) == Row()) )
);

 

View solution in original post

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: How to Create a Subset Table of the Final Row of Data per Group

I can see several ways to do this with JSL. Try this:

 

Names Default To Here( 1 );
dt = Current Data Table();
dt << Subset(
	Selected Columns( 0 ),
	Rows( dt << Get rows where( Col Max( Row(), :Group ) == Row()) )
);