conditional match with two columnsHi JMP users
How to write a script to print a value from column:EtOH % form maximum index of : fermentation Age .
For example: if the maximum fermentation Age for Batch 03-05-2022 is 68 then the EtOH % value (13.45) should be picked and printed to the output column.

Attached a JMP table here.
Looking forward for your suggestion
Regards
ScriptingRe: conditional match with two columnsHere are 2 similar approaches to solve your issue.
Names Default To Here( 1 );
dt = Current Data Table();
dt << New Column( "Output 2",
formula(
theMax = Col Maximum( :EtOH %, :Batch );
If( theMax == :EtOH %,
:EtOH %,
.
);
)
);
Names Default To Here( 1 );
dt = Current Data Table();
dt << New Column( "Output 3" );
for each row(
theMax = Col Maximum( :EtOH %, :Batch );
If( theMax == :EtOH %,
:Output3 = :EtOH %,
:Output3 = .
);
);
Re: conditional match with two columnsThank you, Jim.