抱歉,但我不完全理解您要做什麼。 希望繼續對話,並為您提供一些可供審查的方法,下面我有一些JSL,它創建了一個與您的表相似的數據表,並使用3種不同的公式使用不同的計算均值的方法。 看一看,看看它是否能滿足您的需求,如果不能,那麼您可以更確切地說明您要計算的內容嗎?
New Table( "Example",
Add Rows( 4 ),
New Column( "Label",
Character,
"Nominal",
Set Values( {"Dry", "Wet", "outlet Dry", "Outlet Wet"} )
),
New Column( "a",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [80, 67, 57, 55] ),
Set Display Width( 47 )
),
New Column( "b",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [79, 66, 59, 57] )
),
New Column( "c",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [88, 77, 66, 55] )
),
New Column( "One",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
Mean( dt[Row(), Index( 2, 4 )] );
)
),
New Column( "two",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
Mean( dt[Index( 3, 4 ), Index( 2, 4 )] );
)
),
New Column( "three",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
theColumns = dt << get column names( numeric );
Remove From( theColumns, 4, 2 );
Mean( theColumns );
)
)
)