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
- :
- How to create a formula column to find the maximum of several columns

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

Feb 3, 2014 2:00 PM
(5265 views)

I have several columns of numeric data (see example below) and I would like to create a formula column to find the maximum value for each row across the columns. Any help would be appreciated. Thank you!

Value 1 Value 2 Value 3 Max Value (I would put the formula in this column)

1 9 6 9

2 1 5 5

3 7 4 7

4 2 6 6

1 ACCEPTED SOLUTION

Accepted Solutions

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

4 REPLIES 4

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

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

Re: How to create a formula column to find the maximum of several columns

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

Re: How to create a formula column to find the maximum of several columns

If you have many rows which you want to search, is there a function to select a range of rows as opposed to typing in every row into the function?

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

Re: How to create a formula column to find the maximum of several columns

The question asked by @adampaulsmith and answered by @pmroz uses the Maximum() function in a formula define for the resulting column. The formula will automatically loop across each row and apply the formula. Thus, no row reference has to be made.

However, if you are using this in open JSL, you can add a subscript to the column references to indicate which row you process.

```
For( theRow = 1, theRow <= 10, theRow++,
:MaxValue[theRow] = Maximum( :Value 1[theRow], :Value 2[theRow], :Value 2[theRow] );
);
```

See documentation on JSL in the Scripting Guide

Help==>Books==>Scripting Guide

Jim