Local data filterControl Chart(
Sample Label( :C_LOT_NAME ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col(
:Average Pigment Strength,
Individual Measurement( Show Zones( 1 ), Shade Zones( 1 ) ),
Capability(
Distribution(
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :Average Pigment Strength ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 13.5 ), USL( 14.5 ), Sigma( 0.0783611176186691 ) )
),
Local Data Filter( Add Filter( columns( :C_LOT_NAME ) ) )
)
)
)
);
Hi
I am trying to add a script to run a local data filter to a capability analysis:
Any help would be much appreciated
I am getting an error message - Unexpected end of input, trying to parse arguments of function |!"Chart Col |!"."
Thanks
Chris
Re: Local data filterThanks for reply Ian, will have a try at this.
Regards
Chris
Re: Local data filterNot sure if this helps or not, Chris. But here's another example (using Control Chart Builder). You should be able to edit the first few lines and not have to change the rest.
Names Default To Here( 1 );
// 'dt' references the table you want to use
dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );
// 'yCol' references the column with your measurements
yCol = Column(dt, "Weight");
// 'sCol' references the column defining your samples
sCol = Column(dt, "Sample");
// 'fCol' references the column you want to filter by
fCol = Column(dt, "Weight2");
// In this case, also need to add some spec limits so we get a capability analysis
yCol << Set Property("Spec Limits", {LSL( 16 ), USL( 24 ), Target( 20 ), Show Limits( 0 )});
// Make the display
dt << Control Chart Builder(
Show Control Panel( 0 ),
Variables( Subgroup( sCol ), Y( yCol ) ),
Local Data Filter(Add Filter(columns( fCol )))
);Re: Local data filterGood Morning
Thanks for reply. I thought I was close as no longer getting errors but when I run this I get the Run chart and the distributions OK but no data filter (feel like i'm close!), i'm a Plant chemist rather than a programmer so kind off get by with trial and error. Tried using your suggestion but unfortunately still no data filter. Thanks, always appreciate the help as a bit of a struggle at times for me.
Control Chart(
Sample Label( :C_LOT_NAME ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col(
:Average Pigment Strength,
Individual Measurement( Show Zones( 1 ), Shade Zones( 1 ) );
Capability(
Distribution(
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :Average Pigment Strength ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 13.5 ), USL( 14.5 ), Sigma( 0.0783611176186691 ) )
),
Local Data Filter( Add Filter( columns( :C_LOT_NAME ) ) )
) ) );
If I add this piece of script below the one above I do get the Distribution and local data filter in a seperate window without the run chart:
Distribution(
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :Average Sample Conductivity ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 1.2 ), USL( 2.7 ), Sigma( 0.0690324131402561 ) )
),
Local Data Filter( Add Filter( columns( :C_LOT_NAME ) ) )
);
Regards
Chris
Re: Local data filteroops, looks like Jim already answered this.
Re: Local data filterTry this the key is obj << Capability. This is using a JMP sample data table
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );
dt:Sample << Modeling type("Nominal");
obj = dt << Control Chart(
Sample Label( :Sample ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Weight),
Chart Type(Individual Measurement),
Show Zones( 1 ), Shade Zones( 1 )
);
obj << Capability(
Distribution(
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :Weight ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 16 ), USL( 24 ), Target(20) )
),
Local Data Filter( Add Filter( columns( :Sample ) ) )
)
);Re: Local data filterHi Jim
Thanks for quick reply.
Strange one this! If I just run the capability and copy script as you advise then all looks fine, I get the run chart and capability analysis on same window. If I then put on a local data filter and check script under the red triangle then neither the local filter nor capability script shows up!

Capability only
Control Chart(
Sample Label( :C_LOT_NAME ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col(
:Average Pigment Strength,
Individual Measurement( Show Zones( 1 ), Shade Zones( 1 ) ),
Capability(
Distribution(
Continuous Distribution(
Column( :Average Pigment Strength ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 13.5 ), USL( 14.5 ), Sigma( 0.092069130588337 ) )
)
)
)
)
)
+ Local Data Filter
Control Chart(
Sample Label( :C_LOT_NAME ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Average Pigment Strength, Individual Measurement( Show Zones( 1 ), Shade Zones( 1 ) ) )
)
What I can get is the relevant capability and data filter script from the 'Capability' red triangle and paste it into my main script, but this gives the run chart and the capabilty/data filter on a seperate window. Feel like i'm almost there but not quite.
Distribution(
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :Average Pigment Strength ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Outlier Box Plot( 0 ),
Normal Quantile Plot( 1 ),
Capability Analysis( LSL( 13.5 ), USL( 14.5 ), Sigma( 0.092069130588337 ) )
),
Local Data Filter( Add Filter( columns( :C_LOT_NAME ) ) )
);
Thanks
Chris
Re: Local data filterWhat you need to do, to get the proper script for your analysis, is to first run the analysis interactively, and then once you have it setup the way you want it......including the Local Data Filter, then just go to the red triangle for the Control Chart Builder, click on it, and select
Save Script==>To Script Window
and it will give you the completed script.