Select last point in each runSuppose I have columns: run_id, time, distance
... and I want to just select the rows with the last time for each run_id. How do I do that?
Re: Select last point in each runJust to add something that I hope is obvious to all......for @Mark_Bailey code to work, the data table needs to be sorted ascending on columns run_id and timeRe: Select last point in each runIs this pretty typical in JMP, to create formula columns to look for certain conditions then select based on that?
I played around for a minute after writing this question and ended up with this formula column: Col Maximum ( :Name( "time(s)" ), :run_id ) - :Name( "time(s)" )
... then I just click on one of the rows with "0" and then did a "select matching". I was hoping there was an easier way, like making a summary table with max(time) grouped by run_id, then let me select the rows there, but those rows were selecting all of the data from which the max was calculated, not just the rows that held the max value.Re: Select last point in each runYou can create an indicator column using a formula. Be sure to sort (nested) by run_id and time first. The formula would be a simple Boolean result. Use the Lag() function as such: If( :run_id == Lag( :run_id, -1 ), 0, 1 ). Then you can select the rows where this column equals 1.