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
- :
- Corresponding Row for a Column Minimum

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 21, 2017 8:30 AM
(842 views)

I am trying to find a corresponding row for a column Minimum "DEF" and trying to do that by column "GHI"?

I am able to find the Column Minimum for "DEF" but I am not getting the corresponding row value for column "ABC"?

I am using the following piece of code:

dt = current data table();

dt<<newColumn("BestB",numeric,continuous,Format("Best"),Formula(x = col minimum(:DEF,:GHI);));

dt<<newColumn("BestO",numeric,continuous,Format("Best"),Formula(rmat = dt << get rows where(:DEF == x);

r = rmat[1];

y = :ABC[r];));

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 21, 2017 9:22 AM
(1649 views)

Solution

See if this code provides you what you want

```
dt = Current Data Table();
dt << New Column( "BestB", numeric, continuous, Format( "Best" ), Formula( Col Minimum( :DEF, :GHI ) ) );
dt << New Column( "BestO",
numeric,
continuous,
Format( "Best" ),
Formula(
dt=current data table();
GHIValue = :GHI;
:ABC[(dt<<get rows where( GHIValue == :GHI & :DEF == :BestB ))[1]];
)
);
```

Jim

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 21, 2017 9:22 AM
(1650 views)

See if this code provides you what you want

```
dt = Current Data Table();
dt << New Column( "BestB", numeric, continuous, Format( "Best" ), Formula( Col Minimum( :DEF, :GHI ) ) );
dt << New Column( "BestO",
numeric,
continuous,
Format( "Best" ),
Formula(
dt=current data table();
GHIValue = :GHI;
:ABC[(dt<<get rows where( GHIValue == :GHI & :DEF == :BestB ))[1]];
)
);
```

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 21, 2017 9:42 AM
(821 views)