cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-533362%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E8%A4%87%E6%95%B0%E3%81%AE%E5%88%97%E3%81%8B%E3%82%89%E6%9C%80%E5%A4%A7%E3%81%AE%E6%95%B0%E5%80%A4%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%99%E3%82%8B%E6%95%B0%E5%BC%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-533362%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%95%B0%E5%80%A4%E3%82%92%E5%90%AB%E3%82%80%202%20%E3%81%A4%E3%81%AE%E9%96%A2%E9%80%A3%E3%81%99%E3%82%8B%E5%88%97%E3%81%8C%E3%81%82%E3%82%8A%E3%80%812%20%E3%81%A4%E3%81%AE%E5%85%A5%E5%8A%9B%E5%88%97%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%99%E3%82%8B%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%20%E7%A7%81%E3%81%8C%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E3%81%99%E3%81%B9%E3%81%A6%E3%80%81%E6%95%B0%E5%BC%8F%E3%81%AE%E3%80%8Celse%E3%80%8D%E3%81%A7%E7%B5%82%E3%82%8F%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%81%9D%E3%82%8C%E3%81%AF%E6%9C%9B%E3%82%93%E3%81%A7%E3%81%84%E3%81%AA%E3%81%84%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%82%E3%81%AA%E3%81%9F%E3%81%8C%E6%96%B9%E6%B3%95%E3%82%92%E7%9F%A5%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AA%E3%82%89%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%83%87%E3%82%AB%E3%83%AB%E3%83%AD%E5%8D%9A%E5%A3%AB%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-533362%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E3%83%87%E3%83%BC%E3%82%BF%E8%A1%A8%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-533366%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E8%A4%87%E6%95%B0%E3%81%AE%E5%88%97%E3%81%8B%E3%82%89%E6%9C%80%E5%A4%A7%E3%81%AE%E6%95%B0%E5%80%A4%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%99%E3%82%8B%E5%BC%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-533366%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Emax(%20col%20max(%3Acol1)%2C%20col%20max(%3Acol)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E3%81%93%E3%82%8C%E3%81%AB%E3%82%88%E3%82%8A%E3%80%812%E5%88%97%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%81%8C%E5%BE%97%E3%82%89%E3%82%8C%E3%82%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-533978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E8%A4%87%E6%95%B0%E3%81%AE%E5%88%97%E3%81%8B%E3%82%89%E6%9C%80%E5%A4%A7%E3%81%AE%E6%95%B0%E5%80%A4%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%99%E3%82%8B%E5%BC%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-533978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%82%E3%81%AA%E3%81%9F%E3%81%8C%E4%BD%95%E3%82%92%E6%9C%9B%E3%82%93%E3%81%A7%E3%81%84%E3%82%8B%E3%81%8B%E3%81%AF%E6%98%8E%E7%A2%BA%E3%81%A7%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%81%8C%E3%80%81%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14837%22%20target%3D%22_blank%22%3E%20%40aadecarlojr%3C%2FA%3E%20.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E5%85%A8%E4%BD%93%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%AA%E5%A0%B4%E5%90%88%3CEM%3E%E5%85%A8%E3%81%A6%3C%2FEM%3E%E6%8C%87%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%9F%202%20%E3%81%A4%E3%81%AE%E5%88%97%E3%81%AE%E5%80%A4%E3%80%81%E6%AC%A1%E3%81%AB%E3%81%9D%E3%81%AE%20JSL%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2687%22%20target%3D%22_blank%22%3E%20%40txnelson%3C%2FA%3E%E4%B8%8A%E8%A8%98%E3%81%A7%E4%B8%8E%E3%81%88%E3%82%89%E3%82%8C%E3%81%9F%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E4%B8%80%E6%96%B9%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AA%E3%82%82%E3%81%AE%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%AA%E5%A0%B4%E5%90%88%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E%3CSTRONG%3E%E3%81%82%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E%3CSTRONG%3EB%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E%3CSTRONG%3EA%20%E3%81%A8%20B%20%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E3%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E7%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20valign%3D%22middle%22%3E%3CP%3E8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%E6%AC%A1%E3%81%AB%E3%80%81%E5%BC%8F%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EMaximum(%3AA%2C%20%3AB)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E3%81%82%E3%81%AA%E3%81%9F%E3%81%AB%E3%81%9D%E3%82%8C%E3%82%92%E4%B8%8E%E3%81%88%E3%82%8B%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222022-08-15_15-26-54.698.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F44794i2D6E27BCB6B75401%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222022-08-15_15-26-54.698.png%22%20alt%3D%222022-08-15_15-26-54.698.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-534338%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%E8%A4%87%E6%95%B0%E3%81%AE%E5%88%97%E3%81%8B%E3%82%89%E6%9C%80%E5%A4%A7%E3%81%AE%E6%95%B0%E5%80%A4%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%99%E3%82%8B%E5%BC%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-534338%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EJeff%20%E3%81%A8%20TxNelson%20%E3%81%AB%E6%84%9F%E8%AC%9D%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E7%A7%81%E3%81%AF%E5%BE%8C%E8%80%85%E3%80%81%E8%A1%8C%E3%81%94%E3%81%A8%E3%81%AB%E6%9C%80%E5%A4%A72%E5%88%97%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%9D%E3%82%8C%E3%81%AF%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E7%A7%81%E3%81%AE%E7%A0%94%E7%A9%B6%E3%81%A7%E3%81%AF%E3%80%81R%20%E3%83%87%E3%83%BC%E3%82%BF%E3%81%A8%20L%20%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E5%88%A5%E3%80%85%E3%81%AB%E5%85%A5%E5%8A%9B%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81R%20%E3%81%BE%E3%81%9F%E3%81%AF%20L%20%E3%81%AE%E3%81%84%E3%81%9A%E3%82%8C%E3%81%8B%E3%81%8B%E3%82%89%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%82%92%E5%90%AB%E3%82%80%E5%88%97%E5%A4%89%E6%95%B0%E3%82%82%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%83%A9%E3%83%96%E3%82%BD%E3%83%AA%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
aadecarlojr
Level III

formula to provide greatest numerical value from multiple columns

I have two related columns with numerical values and I cannot figure out how to create a formula column that delivers the maximal value of the two input columns. Everything I try ends up with an "else" in the formula and I don't think I want that.

 

thanks if you know how.

 

Dr. DeCarlo

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: formula to provide greatest numerical value from multiple columns

It's not clear exactly what you want, @aadecarlojr.

 

If you want the maximum value across all the values of the two given columns then the JSL that @txnelson gave above will work.

 

If, on the other hand, you want something like this:

 

A

B

Max of A and B

1

2

2

4

3

4

8

7

8

Then the formula:

 

Maximum(:A, :B)

will give you that.

2022-08-15_15-26-54.698.png

-Jeff

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: formula to provide greatest numerical value from multiple columns

max( col max(:col1), col max(:col) );

I think this will give you the maximum value for the 2 columns

Jim
Jeff_Perkinson
Community Manager Community Manager

Re: formula to provide greatest numerical value from multiple columns

It's not clear exactly what you want, @aadecarlojr.

 

If you want the maximum value across all the values of the two given columns then the JSL that @txnelson gave above will work.

 

If, on the other hand, you want something like this:

 

A

B

Max of A and B

1

2

2

4

3

4

8

7

8

Then the formula:

 

Maximum(:A, :B)

will give you that.

2022-08-15_15-26-54.698.png

-Jeff
aadecarlojr
Level III

Re: formula to provide greatest numerical value from multiple columns

Thanks to Jeff and TxNelson. I did want the latter, row by row maximum of two columns and that works.  In my research we entered separate R and L data but also want a column variable that contains the max from either R or L.

 

Love solutions!

Recommended Articles