based on solution above, how would I now implement similar for multiple CuSum charts where By: is used, but all having different target values depending on the day.. So in the following script example, If Day =1, targ = 6. if day =2, targ = 7, etc,etc
Names Default To Here(1);
targ = 6;
dt = Open("$SAMPLE_DATA/Quality Control/Vial Fill Weights.jmp");
Eval(EvalExpr(
obj = dt << CUSUM Control Chart(
Y(:Fill Weight),
X(:Sample),
Target(Expr(targ)),
By (:Day)
);
));
Names Default To Here(1);
targ = 8;
dt = Open("$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp");
Eval(EvalExpr(
obj = dt << CUSUM Control Chart(
Y(:weight),
X(:hour),
Target(Expr(targ)),
Sigma(0.05),
head start(0.05)
);
));