Hi,
I have the following script that will tabulate test_type_combo by few tests(Test1, Test2, Test3, Test4, Prepass) each with sum the n_unit and n_unit_passed for a parameter named coil_supplier_A. Then will create a new column, Yield. From here, I will have Graph builder to do the plotting. Can I know if I have multiple parameter for suppliers, each in a column eg. coil_supplier_B, coil_supplier_C and coil_supplier_D, how can I put all suppliers into the script and auto plot everyone(in this case there will be total 4 plots). Or perhaps if there is other better way to do it.
Many thanks.
Script:
dt = Current Data Table();
tab= dt << Tabulate(
Add Table(
Column Table(
Grouping Columns( :test_type_combo ),
Analysis Columns(
:Name( "Sum(n_unit)" ),
:Name( "Sum(n_unit_passed)" )
)
),
Row Table(
Grouping Columns(
:work_week,
:coil_supplier_A,
:product_family
)
)
)
);
dtTab= tab << makeIntoDataTable;
dtTab << new column("Yield",numeric,Formula(
(:Name( "Sum(Sum(n_unit_passed), PrePass)" ) /
:Name( "Sum(Sum(n_unit), PrePass)" )) * (
:Name( "Sum(Sum(n_unit_passed), Test1)" ) /
:Name( "Sum(Sum(n_unit), Test1)" )) * (
:Name( "Sum(Sum(n_unit_passed), Test4)" ) / :Name( "Sum(Sum(n_unit), Test4)" )
) * (:Name( "Sum(Sum(n_unit_passed), Test2)" ) /
:Name( "Sum(Sum(n_unit), Test2)" )) * (:Name(
"Sum(Sum(n_unit_passed), Test3)"
) / :Name( "Sum(Sum(n_unit), Test3)" )) * 100
)
);
dtTab << Graph Builder(
Variables(
X( :work_week ),
Y( :PFY ),
Y( :Name( "Sum(Sum(n_unit), Test1)" ) ),
Group X( :product_family ),
Overlay( :coil_supplier_A )
),
Elements(
Position( 1, 1 ),
Points( X, Y, Legend( 6 ) ),
Line( X, Y, Legend( 7 ) )
),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 4 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 6, Base( 0, 0, 0 ), Base( 1, 0, 0 ), Base( 2, 0, 0 ) )}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "coil_supplier_A" )}
),
Dispatch( {}, "Y 1 title", TextEditBox, {Set Text( "unit Qty" )} ),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {6, [0, 1, 2], 7, [6, 7, 8], 4, [3, 4, 5]} ),
Position( {0, 1, 2, 6, 7, 8, 3, 4, 5} )}
)
)
);