我試圖弄清楚如何增加每年所有子組件的不可靠性。

我正在考慮為每年創建一個數組,並使用“Product”函數來乘以數組中的所有元素。 但我覺得這會是循環中的循環。 有什麼建議來完成這項任務嗎?
謝謝。
嘗試使用這個公式
If( Row() == 1,
x = :Useful Life Unreliability Rollup per Subcomponent type
);
If( Lag( :year ) != :year,
x = :Useful Life Unreliability Rollup per Subcomponent type,
x = :Useful Life Unreliability Rollup per Subcomponent type * x
);
x;
@mquyen ,
如果只有表格>>摘要平台或分析>>製表程序將“產品”作為選項,那麼您提出的問題應該很容易回答。
同時我會這樣做的方式如下:
首先按年份拆分錶格,並按子組件分組。然後產品可作為新列的公式中的選項。
Names Default To Here( 1 );<BR />dt1 = New Table( "original",<BR />Add Rows( 16 ),<BR />New Column( "Sub-Component",<BR />Character,<BR />"Nominal",<BR />Set Values( {"a1", "a1", "a1", "a2", "a2", "a2", "a3", "a3", "a3", "a4", "a4", "a4", "dc1", "dc1", "dc1", "dc2"} )<BR />),<BR />New Column( "Year", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1] ) ),<BR />New Column( "unreliability", Numeric, "Continuous", Format( "Best", 12 ), Formula( Random Normal() ^ 2 ) )<BR />);<BR />dt2 = dt1 << Split(<BR />Split By( :Year ),<BR />Split( :unreliability ),<BR />Group( :"Sub-Component"n ),<BR />Output Table( "splilt_table.jmp" ),<BR />Sort by Column Property<BR />);<BR />// New formula column: 1*2*3<BR />dt2 << New Formula Column( Operation( Category( "Combine" ), "Product" ), Columns( :"1"n, :"2"n, :"3"n ) );
如果您運行一次,下次您可以通過腳本或從菜單中單擊來對數據執行相同的操作。兩者都應該相當容易。
請告訴我們它是否適合您。