cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
jinsejoseph
Level III

JMP script to find max value from mutiple column with unique key word

Hi Team,

 

I am looking for a script that can help to find max value from mutiple column ,

but column count will vary run to run but will have a unique key word as test_result,

 

Thanks in advance 

Test_Result 1Test_Result 2Test_Result 3Test_Result 4Test_Result 5Test_Result 6Test_Result 7Test_Result 8Expected data
-58151      151
110111      111
111110      111
111111      111
111110      111
110110      110
111110      111
108108108107109109110113113
109111108110110110110110111
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JMP script to find max value from mutiple column with unique key word

If you want to have formula, here is one slight modification you could do:

Eval(Parse("dt << new column(\!"max_col\!",numeric,formula( Maximum(" || ":" || Concat Items(use_cols, ", :") || ")));"));

jthi_0-1649852060250.png

 

-Jarmo

View solution in original post

3 REPLIES 3
jinsejoseph
Level III

Re: JMP script to find max value from mutiple column with unique key word

 

Hi , Tried below command,

Eval(Parse("dt << new column(\!"max_col\!",numeric,formula( Maximum(" || char(use_cols) || ")));"));

 

were use_cols having the column name,

but not able to find max value,

when checked formula found that " " is appending in MAXIMUM function,
 how to remove the " " 

jinsejoseph_0-1649850992619.png

 

jthi
Super User

Re: JMP script to find max value from mutiple column with unique key word

If you want to have formula, here is one slight modification you could do:

Eval(Parse("dt << new column(\!"max_col\!",numeric,formula( Maximum(" || ":" || Concat Items(use_cols, ", :") || ")));"));

jthi_0-1649852060250.png

 

-Jarmo
jinsejoseph
Level III

Re: JMP script to find max value from mutiple column with unique key word

Hi Jthi,

 

Thanks a lot, you suggestion help to solve the issue