make a control chart with a variable for column<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I want to make different control charts based on different columns of data, where the column name are numbers based on an SPC chart numbering system.
For example if I want a control chart based on column "45038", this works fine
chartnum = 45038;
ct1 = Control Chart(
Sample Label( :lot ),
KSigma( 3 ),
GetLimits(\limits.jmp" ),
Chart Col(
:"45038",
XBar( Limits Precision( 0 ) ),
R( Limits Precision( 0 ))
)
);
I can replace :"45038" with name("45038"). But I get a syntax error if I replace it with name (chartnum) or name(char(chartnum))
Any ideas?
Re: make a control chart with a variable for columnThanks!
I dont quite understand the different behaviors, but it works!
Re: make a control chart with a variable for columnOk, maybe a reference for the column is needed. Try this:
dt = Current Data Table();
chartnum = 45038;
col = Column(dt, Char(chartnum));
ct1 = Control Chart(
Sample Label(:lot),
KSigma(3),
Chart Col(col, XBar(Limits Precision(0)), R(Limits Precision(0))),
GetLimits("C:\_LOCAL\_Aurrion\_ToBeSorted\charts-working\JMP\limits.jmp")
);
Re: make a control chart with a variable for columnThank you for the suggestion!
Both options enable to control chart to display the data from the appropriate column.
Unfortunately, both options do not find the control limits in my limits.jmp table. Odd.
ct1 = Control Chart(
Sample Label( :lot ),
KSigma( 3 ),
GetLimits("C:\_LOCAL\_Aurrion\_ToBeSorted\charts-working\JMP\limits.jmp" ),
Chart Col(
// :(Char(chartnum)), // display chart, but doesn't find limits in file.
:"45038", // display chart and correct limits
// As Column(Char(chartnum)), // displays chart, but doesn't get limits from file.
XBar( Limits Precision( 0 ) ),
R( Limits Precision( 0 ))
);
Re: make a control chart with a variable for columnTry
As Column(Char(chartnum))
Or simply
:(Char(chartnum))