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
- :
- Re: Table Summary

Topic Options

- Start Article
- 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

Table Summary

Sep 9, 2009 9:26 AM
(1332 views)

By using table summary, I can get the max values of a column.

If I also want to find the vlaues of other columns correspomding to the same row of the max values of a specified column, is there a function JSL has for this purpose?

For example, column D has max of 100 at row 10. Then I want to know the value of column A at row 10. What function can I use in my script?

Thanks a lot for help.

HL

If I also want to find the vlaues of other columns correspomding to the same row of the max values of a specified column, is there a function JSL has for this purpose?

For example, column D has max of 100 at row 10. Then I want to know the value of column A at row 10. What function can I use in my script?

Thanks a lot for help.

HL

3 REPLIES 3

Highlighted
##

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

Re: Table Summary

If you know the index value of the row like you said row 10, you can then pull the data using column[10]. Here is some syntax:

col = Column( Current Data Table(), As Name( "A" ) );

val = col[ 10 ]

print( val )

This isn't a specific function, but I think it will accomplish what you are looking for.

Good Luck!

col = Column( Current Data Table(), As Name( "A" ) );

val = col[ 10 ]

print( val )

This isn't a specific function, but I think it will accomplish what you are looking for.

Good Luck!

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

Re: Table Summary

I am sorry I did not state it clearly.

By doing the summary, I can get the max value of 100 in column D. I need to know which row in column D has the max value of 100. Then I want to get the value of column A in that row which has the max value of 100 in column D.

Thanks a lot for your help.

By doing the summary, I can get the max value of 100 in column D. I need to know which row in column D has the max value of 100. Then I want to get the value of column A in that row which has the max value of 100 in column D.

Thanks a lot for your help.

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

Re: Table Summary

we know that the summary table and the source table (the original table) are linked by row states.

If we select a row in the summary table, the corresponding rows in the source table will be selected. so maybe you can do something like this :

dt = current data table();

summary = dt << Summary( Group( summarycolumn ) );

n = nrows(summary);

for (i=1, i summary << select rows (i);

theRows = (dt << getselectedrows());

// now theRows has the rows for group i, do whatever you want with it.

dt << clear select;

)

If we select a row in the summary table, the corresponding rows in the source table will be selected. so maybe you can do something like this :

dt = current data table();

summary = dt << Summary( Group( summarycolumn ) );

n = nrows(summary);

for (i=1, i

theRows = (dt << getselectedrows());

// now theRows has the rows for group i, do whatever you want with it.

dt << clear select;

)