Hello,
I'm plotting three different charts(IR,EWMA & CUSUM) in a single window but the problem I'm facing is it's displaying the where condition used within charts on the display window as well.
Display Window:
Code:
obj=New Window("Trend Analysis Report "||Long Date(Today()),
vlb=V list Box()
);
display=Function({Process,Label,By,Src_Type,lmt1,lmt2,lmt3},
r1=New Window("",
plb=Panel Box(" Control Charts for "||Process||" & "||" Source Type= "||Src_Type,Current Data Table(dt);
H List Box(
Control Chart(
Sample Label(Column(dt,Label)),
Group Size(1),KSigma(3),
As Column(dt,Process),Individual Measurement(LCL(lmt1[6]),AVG(lmt1[5]),UCL(lmt1[7]))),
Where(As Column(dt,By)==Src_Type);
);
Sample Label(Column(dt,Label)),
Sample Size(1),
Alpha(0.00269979606326021),
Show Limits Legend(0),
As Column(dt,Process),CUSUM(Two Sided(1),AVG(lmt2[5]))),
Where(As Column(dt,By)==Src_Type);
);
Sample Label(Column(dt,Label)),
Sample Size(1),
KSigma(3),Weight(0.2),
As Column(dt,Process),EWMA(AVG(lmt3[5]))),
Where(As Column(dt,By)==Src_Type);
);
);
);
);vlb<<Append(r1);r1<<Close Window;
);
plot=Function({lmts,pmt_path},
param_dt=Open(pmt_path,"invisible");
param_summ=param_dt<<Summary(Invisible,
Group(:Group By,:Process,:Sample Label,:By))<<Show Window(0);
For(q=12,q<=NRow(param_summ),q++,Current Data Table(param_summ);
col2=:Process[q];col3=:Sample Label[q];col4=:By[q];
Current Data Table(lmts);
clms=lmts<<Get Column Names(String);
Remove From(clms,1,3);
For(t=1,t<=N Items(clms),t++,Current Data Table(lmts);
indv_lmts=As Column(clms[t])[lmts<<Get Rows Where(:Parameter==col2 & :Chart Type=="Individual")];
cusum_lmts=As Column(clms[t])[lmts<<Get Rows Where(:Parameter==col2 & :Chart Type=="CUSUM")];
ewma_lmts=As Column(clms[t])[lmts<<Get Rows Where(:Parameter==col2 & :Chart Type=="EWMA")];
display(col2,col3,col4,clms[t],indv_lmts,cusum_lmts,ewma_lmts);
);
);
);
I'm not able to figure out why it is happening. Any help would be appreciated. Thanks!!