Hi,
Started to work on JMP for the last couple of weeks and have a question on how to get unique values from a column and use those values as inputs in designing a control chart.
- Step 1: Importing an excel sheet; this step works fine.
- Step 2: Trying to create a control chart from the excel sheet data. However I need help in the Track Names part where Track Names is a column in the excel sheet which has duplicate values. What I want to do is first create a unique set of values from that column and then use those unique set of values in the for loop. I have highlighted the part in yellow where I am stuck..
- My thoughts: Initially what I did is load the unique track names ( done manually in excel) as a list and then tried to access the contents of the list in the for loop by using the show command. However that doesn't work. Not sure the exact reason but I think its mainly because I'm accessing the week and calculation column from the excel sheet but the Track name from the list so I guess JMP doesn't like that.
Please let me know how to go forward with this. Thank you for your help in advance.
//Selecting the JMP Table sheet from the Consolidation Macro excel file.
Open Database("DSN=Excel Files;DBQ=C:\Users\XXX.xlsm;DriverId=1046;MaxBufferSize=2048;PageTimeout=5;",
"SELECT * FROM `abc$`","abc Data table$");
A = {"John","Pace","Rodriguez"}; // Created a unique list from the Track Names column manually.
New Window( "Control Charts for NA & LA Client",
V List Box(
for(i=1,i<=NItems(A),i++,
Control Chart(
Sample Label( :WEEK ),
//Alarm Script( Write( "i,", qc_test, ",", qc_col, qc_sample, "\!N" ) ),
Group Size( 1 ),
Ksigma( 3 ),
Chart Col( :Calculation, Individual Measurement( Show Zones( 2 ), Shade Zones( 2 ), Test 6( 1 ) ) ),
Where( :Track Names == show(A) ),
),
),
)
) ;