how can I show change ratio in graph between two test at different time?I drew a graph that changed over time. I cant show the range very convenient, but I want show the ratio on range. example,the last value changed 10% than first test value, I want show in the graph.
Re: how can I show change ratio in graph between two test at different time?You could use temporary 'columns' created from within the graph builder platform. To do this interactively, right click on a column name and select formula (or Transform, Row, etc) from within the 'Variables' section of the graph builder platform. Note that this method to find the first value can be slow with very large data tables.
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: how can I show change ratio in graph between two test at different time?This is building on Ian's response. The script uses a Transform Column(). This can be done via point an click by right clicking on the column name :Response and select Formula.
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: how can I show change ratio in graph between two test at different time?Can I do it without new column and the Formula?Re: how can I show change ratio in graph between two test at different time?If I understand correctly, try running this script to make a table.
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 )
)
)
If the saved script in the table gives you what you want, take a look at the column formula.