turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Get row number or row value

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Nov 12, 2015 1:59 AM
(5659 views)

Hello Guys,

I am new to Jmp and JSL as well. I am trying to get say the minimum value in "**MaxGPM**" column which will be 57 in this case and also get the row value corresponding to "**ASF**" and "**GSF**" columns which is 6871 and 10221. I can only get the first one but can't get the latter two. Is there a script to get the row number for the values. Here is my script(not working) and table below. Thank you!

Script:

```
dt = Current Data Table();
x = Col Minimum(:"Max.GPM");
dt << get row(x);
y = :"ASF" (Col Minimum(:"Max.GPM"));
z = :"GSF" (Col Minimum(:"Max.GPM"));
```

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Nov 12, 2015 5:55 AM
(10316 views)

Solution

I noticed that you refer to the MaxGPM column as Max.GPM. Is that a typo? Anyway the following code will do the trick:

```
dt = current data table();
x = col minimum(:MaxGPM);
rmat = dt << get rows where(:MaxGPM == x);
r = rmat[1];
y = :ASF[r];
z = :GSF[r];
```

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Nov 12, 2015 5:55 AM
(10317 views)

I noticed that you refer to the MaxGPM column as Max.GPM. Is that a typo? Anyway the following code will do the trick:

```
dt = current data table();
x = col minimum(:MaxGPM);
rmat = dt << get rows where(:MaxGPM == x);
r = rmat[1];
y = :ASF[r];
z = :GSF[r];
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Nov 12, 2015 10:25 AM
(5288 views)