條件匹配兩列嗨 JMP 用戶
如何編寫腳本以打印列中的值:EtOH % 形成最大索引:發酵年齡。
例如:如果批次 03-05-2022 的最大發酵年齡為 68,則應選擇 EtOH % 值 (13.45) 並將其打印到輸出列。

這裡附上一張JMP表。
期待您的建議
問候
腳本回复:條件匹配兩列這裡有 2 種類似的方法來解決您的問題。
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 = .
);
);
回复:條件匹配兩列謝謝你,吉姆。