這是一個示例數據表,第 4 列“所需的公式列”顯示了我想要得到的結果。
| 團體 | 樣品編號 | 數據價值 | 所需的公式列 |
一個 | 1 | 22.1 | 200 |
| 一個 | 2 | 104.2 | 200 |
| 一個 | 3 | 200 | 200 |
| 乙 | 1 | 18.6 | 199.5 |
| 乙 | 2 | 95.4 | 199.5 |
| 乙 | 3 | 105.8 | 199.5 |
| 乙 | 4 | 170 | 199.5 |
| 乙 | 5個 | 199.5 | 199.5 |
| C | 1 | 40 | 100 |
| C | 2 | 60 | 100 |
| C | 3 | 80 | 100 |
| C | 4 | 100 | 100 |
我正在尋找一個列公式,它將輸入每組最後一個時間點的數據值的值。
提前致謝!
朱麗葉
對不起。 我正在刪除我的評論,因為我誤讀了這個問題。 公認的解決方案絕對是要走的路。
如果數據總是隨樣本增加,則使用 Col Max 函數非常簡單。如果最高的樣本並不總是具有最高的數據值,那就有點複雜了。 請參閱下面的一種可能的方法,請注意,這對於大型表來說會很慢:
New Column( "If Data always Increases with Sample Number",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Col Max( :Data Value, :Group ) ),
Set Display Width( 171 )
);
New Column( "If Data not related to Sample Number",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
MaxSample = Col Max( :Sample Number, :Group );
g = Associative Array( Loc( :Group << Get Values(), :Group ) );
s = Associative Array( Loc( :Sample Number << Get Values(), MaxSample ) );
union = g;
union << intersect( s );
r = Max( union << get keys );
:Data Value[r];
),
Set Display Width( 136 )
);