我试图弄清楚如何增加每年所有子组件的不可靠性。

我正在考虑为每年创建一个数组,并使用“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 ) );
如果您运行一次,下次您可以通过脚本或从菜单中单击来对数据执行相同的操作。两者都应该相当容易。
请告诉我们它是否适合您。