cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
BHarris
Level VII

Select rows with minimum value that meets some criteria

Starting with:

 

Open( "$SAMPLE_DATA/Big Class.jmp" );

 

... I'd like to select the records of the shortest male student at each age who is at least 60" tall, i.e., Tim (age 12, 60" tall), Joe (age 13, 63" tall), Frederick (age 14, 63" tall), Mark (age 15, 62" tall), Phillip (age 16, 68" tall), Kirk (age 17, 68" tall).

 

I've tried a half-dozen different ways to do this with either formula columns or "select where..." and haven't been able to come up with an approach to do this. 

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Select rows with minimum value that meets some criteria

One option which should work

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << Select Where(
	:sex == "M" & :height >= 60 & :height == Col Min(:height, :sex, :height >= 60, :age)
);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Select rows with minimum value that meets some criteria

One option which should work

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << Select Where(
	:sex == "M" & :height >= 60 & :height == Col Min(:height, :sex, :height >= 60, :age)
);
-Jarmo
BHarris
Level VII

Re: Select rows with minimum value that meets some criteria

Wow, impressive!

 

I would love to understand this a little better -- specifically I don't understand how the Col Min is treating argument #3. I get what it's doing with args #2 and #4, but I'm really surprised that you can put an expression in there instead of just a column label.  Any comments on how you think about those arguments?

 

Thank you!

jthi
Super User

Re: Select rows with minimum value that meets some criteria

It is just like the other byVars, it will get value 1 if :height is over or equal to 60 and 0 if not.

Split it into parts and you can test it (create new column with the :height >= 60 and then use that instead in the Col Min()).

-Jarmo

Recommended Articles