How to get only "Cp" value for a column in a Datatable?Hi,
I would like to get Cp value for a column in my data table to use it in multiple script location to tabulate it. With the available function "obj << Process Capability( LSL( 5 ), Target( 40 ), USL( 75 ) );" it is clear that we can get all process capability parameters in a plot. However i would like to get Cp value for a column and assign it to a variable in my script to use it in multiple script location.
AnalyticsData TableScriptingWindowsRe: How to get only "Cp" value for a column in a Datatable?This little script will return the Cp for column PM10 in the Cities sample data table. It runs the Distribution platform and strips off the calculated Cp.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt << Distribution( invisible, Column( :PM10 ) );
obj << Process Capability( LSL( 5 ), Target( 40 ), USL( 75 ) );
cp = (Report( obj )["Within Sigma Capability"][Number Col Box( 1 )] << get)[4];
Report( obj ) << close window;
Show( cp );
cp = 1.10998512783867;
Re: How to get only "Cp" value for a column in a Datatable?Run the platform once, right click on correct table and choose make into datatable, check out result tables table script and finally get value from the result table. From these steps you can build the script and modify it as needed. Below is one example, built using scripting index example and make into datatable's table script (and couple of my own modifications):
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dist = dt << Distribution(Column(:PM10), invisible);
dist << Process Capability(LSL(5), Target(40), USL(75));
dt_result = Report(dist)[Outline Box("Distributions")][Outline Box("PM10")][Outline Box("Process Capability")][Outline Box("PM10 Capability")][
Outline Box("Within Sigma Capability")][Table Box(1)] << Make Into Data Table(invisible);
Report(dist) << Close Window;
cp_idx = Loc(dt_result[0, "Index"], "Cp")[1];
cp_value = Column(dt_result, "Estimate")[cp_idx];
Show(cp_value);
Close(dt_result, no save);Re: How to get only "Cp" value for a column in a Datatable?Thank you Jim !!
Re: How to get only "Cp" value for a column in a Datatable?Thanks Jarmo !!
Re: How to get only "Cp" value for a column in a Datatable?Hi jim,
the code line, "Report(obj)["Within Sigma Capability"][Number Col Box(1)] << get" gives a list with computed process capability values in it. For one of my columns i got a list as {2.63751784878085, 2.63751784878085, 9.87329594422553, 6.25540689650319, 0.123458095613797}; Is it possible to tell in which order( along with their their names) the process capability values present in it, as i would like to access Cpk value too?
Thank you !!