我希望在計算表格內的平均值時獲得一些幫助。 我必須能夠計算每個測試給定輸入範圍的平均值,然後創建一個新列來保存平均值,以便我可以繪製它們。test_1 和 test_3 有兩 (2) 個帶平均值,test_3 有三 (3) 個帶平均值
測試_1:
BAND_1 = 平均( 8 - 11 )
BAND_2 = 平均值 (14.5 - 17.5)
測試_3:
BAND_1 = 平均( 8 - 11 )
BAND_2 = 平均值 (14.5 - 17.5)
測試_2:
BAND_1 = 平均( 8 - 10 )
BAND_2 = 平均值( 8 - 11 )
BAND_3 = 平均值 (14.5 - 17.5)
我附上了一個數據表作為數據當前外觀的示例(第 1 - 7 列)
第 8 - 10 列是我在 Excel 中手動輸入的平均值
第 11 - 13 列也是在 Excel 中完成的,它們是該特定波段的平均值
我有一個包含以下信息的數據表
RowCol-Chnl-PartNo = 唯一標識符
模式=測試模式Q
TesState = 測試狀態QA
輸入 = 測試輸入
test_1 / test_2 / test_3 = 輸出數據。
提前致謝
幹得好……我很高興能提供幫助……抱歉,我沒有在測試 2 的數據中看到 Tx 與 Rx 的要求……
我修改了你的公式並添加了另一個帶列。 這正確填充了列。
New Column( "band1",
numeric,
Formula(
If(
8 <= :input <= 11, 11,
14.5 <= :input <= 17.5, 17.5,
.
)
)
);
New Column( "band2",
numeric,
Formula(
If(
8 <= :input <= 10 & :mode == "Tx", 10,
.
)
)
);
New Column( "band3",
numeric,
Formula(
If(
10 <= :input <= 11 & :mode == "Tx", 11,
.
)
)
);
New Column( "AvgS11M",
Numeric,
Formula(
If( :band1 == :input,
Col Mean(
:test_1,
:Name( "RowCol-Chnl-PartNo" ),
:mode,
:teststate,
:band1
),
.
)
)
);
New Column( "AvgS22M",
Numeric,
Formula(
If( :band1 == :input,
Col Mean(
:test_3,
:Name( "RowCol-Chnl-PartNo" ),
:mode,
:teststate,
:band1
),
.
)
)
);
New Column( "AvgS21M",
Numeric,
Formula(
If(
mode == "Rx" & :band1 == :input, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band1 ),
mode == "Tx" & :band2 == :input, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band2 ),
mode == "Tx" & :band3 == :input, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band3 ),
.
)
)
);
New Column( "S11M_AVG",
Numeric,
Formula(
If( Is Missing( :Band1 ) == 0,
Col Mean(
:test_1,
:Name( "RowCol-Chnl-PartNo" ),
:mode,
:teststate,
:band1
),
.
)
)
);
New Column( "S22M_AVG",
Numeric,
Formula(
If( Is Missing( :Band1 ) == 0,
Col Mean(
:test_3,
:Name( "RowCol-Chnl-PartNo" ),
:mode,
:teststate,
:band1
),
.
)
)
);
New Column( "S21M_AVG",
Numeric,
Formula(
If(
mode == "Rx" & Is Missing( :Band1 ) == 0, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band1 ),
mode == "Tx" & Is Missing( :Band2 ) == 0, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band2 ),
mode == "Tx" & Is Missing( :Band3 ) == 0, Col Mean( :test_2, :Name( "RowCol-Chnl-PartNo" ), :mode, :teststate, :band3 ),
.
)
)
);
謝謝@tx尼爾森。 我現在正在看這個.. 是的,不幸的是 test_2 必須被區別對待。 如果您在模式= 僅Tx 時仔細觀察,您將看到3 個頻段8-10(輸入10 的平均數量)、10 - 11(輸入11 的平均數量)和14.5 - 17.5(輸入17.5 的平均數量) ,
test_2 當 mode = Rx 時,與 test_1 和 test_3 相同。 2 個頻段 8-11(輸入 11 時的平均數量)和 14.5 - 17.5(輸入 17.5 時的平均數量)
我在 test_2 @ mode = Tx 方面遇到了最大的困難
New Column( "band",
numeric,
Formula(
If(
8 <= :input <= 11, 11,
14.5 <= :input <= 17.5, 17.5,
.
)
)
);
New Column( "band3",
numeric,
Formula(
If(
8 <= :input <= 10 & :mode == "Tx", 10,
10 < :input <= 11 & :mode == "Tx", 11,
8 <= :input <= 11 & :mode == "Rx", 11,
14.5 <= :input <= 17.5, 17.5,
.
)
)
);
我已使用第 8-13 列每一列的公式重新創建了您的表格。這些基於我創建的隱藏列,稱為“Band”。您可以檢查每個公式以了解我是如何創建它們的。
有一個問題。在您的條目中,您以不同的方式對待測試 2,因為您指定了 3 個波段,但在示例數據表中,Excel 創建的輸出僅顯示 2 個波段。此外,這些頻段在定義上是重疊的。我不明白你打算如何處理這件事。您的想法是,輸入值為 8-10 的行將在最終平均值列中具有平均值,僅基於 8-10,如果一行的值為 10.25-11,則平均值為 8- 11行?
基表 2 對測試 3 的 3 個頻帶級別進行了猜測。
到目前為止我的回復請參閱隨附的數據表