如何在不同时间的两次测试之间显示图表中的变化率?我绘制了一个随时间变化的图表。我不能显示范围非常方便,但我想显示范围的比例。例如,最后一个值比第一个测试值改变了10%,我希望在图中显示。
Re:如何在不同时间的两次测试之间显示图表中的变化率?您可以使用在图形构建器平台中创建的临时“列”。 要以交互方式执行此操作,请右键单击列名称,然后从图形构建器平台的“变量”部分中选择公式(或“变换”,“行”等)。 请注意,使用非常大的数据表查找第一个值的方法可能会很慢。
dt = New Table( "Change in Response",
Add Rows( 10 ),
New Column( "Response",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 3 ),
Formula( Random Normal( 10, 1 ) ),
Set Display Width( 71 )
)
);
dt << Graph Builder(
Size( 553, 416 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y(
Transform Column(
"Difference",
Format( "Fixed Dec", 12, 3 ),
Formula( :Response / (:Response << Get Values)[1] - 1 )
)
),
Y( :Response )
),
Elements( Position( 1, 1 ), Points( X, Y, Legend( 5 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
"Difference[Response]",
ScaleBox,
{Format( "Percent", 12, 1 )}
)
)
);
Re:如何在不同时间的两次测试之间显示图表中的变化率?这是基于伊恩的回应。 该脚本使用Transform Column()。这可以通过点击右键单击列名称来完成:响应并选择式 。
Graph Builder(
Size( 534, 467 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y( Transform Column("Response", Formula((:Response-:Response[1])/:Response[1]) ) ),
Y( :Response )
),
Elements( Position( 1, 1 ), Bar( X, Y, Legend( 8 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 9 ) ) )
)Re:如何在不同时间的两次测试之间显示图表中的变化率?没有新栏目和公式,我可以这样做吗?Re:如何在不同时间的两次测试之间显示图表中的变化率?如果我理解正确,请尝试运行此脚本来制作表格。
New Table( "Change in Response",
Add Rows( 10 ),
New Script(
"Response & Change in Response",
Graph Builder(
Size( 534, 467 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y( :Change in Response ),
Y( :Response )
),
Elements( Position( 1, 1 ), Bar( X, Y, Legend( 8 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 9 ) ) )
)
),
New Column( "Response",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 3 ),
Formula( Random Normal( 10, 1 ) ),
Set Display Width( 71 )
),
New Column( "Change in Response",
Numeric,
"Continuous",
Format( "Percent", 12, 0 ),
Formula(
Local( {firstResponse = Column( "Response" )[1]},
(:Response - firstResponse) / firstResponse
)
),
Set Display Width( 117 )
)
)
如果表中保存的脚本为您提供了所需内容,请查看列公式。