Adding calculated columns to the Process Screening summary table with JSLI swear I saw a post somewhere where someone was directly adding calculated columns to the process screening summary, and I was wanting to do that.
The specific column I wanted to add would be just a difference between the Specified Sigma and the Within Sigma, although if I can add one it won't be long before I want to add quite a few more...
Anyways, anyone know how to programmatically add additional calculated columns, or if that is possible?
AnalyticsScriptingRe: Adding calculated columns to the Process Screening summary table with JSLThis might be the post you referred to. I am still looking for a better way make sure the table sorts correctly when adding the new column, but it does the job:
https://community.jmp.com/t5/Discussions/Process-Variable-Drift-or-Creep-Detection/m-p/303757#M56055
names default to here(1);
dt = Open("$Sample_Data/iris.jmp");
//Open Process Screening with drift summaries
ps = dt << Process Screening(
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
Control Chart Type( "Indiv and MR" ),
Drift Summaries( 1 )
);
//calculate the difference in sigmas
WithinSigma = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Within Sigma']]" ))[1] << Get;
SpecifiedSigma = (ps << XPath( "//NumberColBox[NumberColBoxHeader[text()='Overall Sigma']]" ))[1] << Get;
SigmaDifference = Matrix(WithinSigma) - Matrix(SpecifiedSigma);
//Add column to table with difference in sigma
ncb = (ps << XPath( "//TableBox" )) << Append( NumberColBox("Sigma Difference", SigmaDifference) );Re: Adding calculated columns to the Process Screening summary table with JSLThis was the one I was looking for. Quick question though, are you saying that any results out of this won't sort? That will be a bit of a show stopper for me on this one.
Re: Adding calculated columns to the Process Screening summary table with JSLI am glad you asked because I didn't include the fix for column ordering in my last post. I updated the script in that reply to write a column to the table and then delete it before pulling the values to be calculated. This fixes the sort order problem, but I hope JMP can implement a better solution in the next version of JMP.