cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
] />

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jevanove
Level III

Local Data Filter on Control Chart Builder - Excluded Rows

I have a stacked table that I am making control charts from. I have a report window, and I am appending a Control Chart Builder to a VListBox in this window. To the control chart builder, I have added a local data filter on the column that indicates which parameter my data belongs to. So to simplify, you can imagine my data table has 4 columns:

  1. Batch - Used to group the data on the x-axis of my control chart
  2. Status - Used to identify if a batch has been reviewed or not
  3. Parameter - Used to identify what the Result value represents
  4. Result - The numerical data being charted

In my table, anything that has not been reviewed has a status of P, and I have those rows excluded in my table. I want to be able to see them on control charts, but I do not want them to be factored into 3-sigma calculations. The challenge I am running into is that the excluded data points are not showing up on my chart. I have the local data filter in Show and Include mode. When I select the "Show Subset" option from the local data filter, I can see the excluded rows are in the subset, but on the chart there are just missing dots where the excluded batches should be. If I turn off the Include mode, I can see the data points, but then the data itself makes no sense. I end up seeing what looks to be an average all data points in the set, regardless of which parameter I have chosen.

If I instead run a control chart builder using the By( :Parameter ) setting, I can see the excluded points just fine. Why does the local data filter cause the chart to not show the excluded points, even if they show up in the subset data that is supposedly being used to make the chart? Is there a fix for this?

3 REPLIES 3
jthi
Super User

Re: Local Data Filter on Control Chart Builder - Excluded Rows

Which version of JMP are you using?

-Jarmo
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Local Data Filter on Control Chart Builder - Excluded Rows

@jevanove are you looking for the gray points on the right side of this chart? If so they show up for me in both JMP 18 and 19.

control chart filtering.png

Code to reproduce example data and chart:

View more...
names default to here(1);
random reset(12);
dt = New Table( "Local Data Filter Example Data",
	Add Rows( 20 ),
	New Column( "Batch",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5] )
	),
	New Column( "Status",
		Character,
		"Nominal",
		Set Selected,
		Set Values(
			{"", "", "", "", "", "", "", "", "", "", "", "", "P", "P", "P", "P", "P",
			"P", "P", "P"}
		)
	),
	New Column( "Parameter",
		Character,
		"Nominal",
		Set Values(
			{"temp", "temp", "pressure", "pressure", "temp", "temp", "pressure",
			"pressure", "temp", "temp", "pressure", "pressure", "temp", "temp",
			"pressure", "pressure", "temp", "temp", "pressure", "pressure"}
		)
	),
	New Column( "Result",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Random Normal( If( :Parameter == "temp", 1, 100 ), 3 ) ),
	)
);
dt << rerun formulas;
dt:Result << delete formula;
New Window("Control Fhart Filtering Example",
	Show Menu( 0 ), Show Toolbars( 0 ),
	h list box(
		dt << Data Filter(
			Location( {1927, 353} ),
			Mode( Select( 0 ), Include( 1 ) ),
			Add Filter( columns( :Status ), Where( Is Missing( :Status ) ) )
		),
		dt << Control Chart Builder(
			Variables( Y( :Result ) ),
			Show Control Panel( 0 ),
			Local Data Filter(
				Add Filter( columns( :Parameter ), Where( :Parameter == "temp" ) )
			),
			SendToReport(
				Dispatch( {}, "", ScaleBox,
					{Min( -0.039375 ), Max( 20.435625000000002 )}
				)
			)
		)
	)
);
jevanove
Level III

Re: Local Data Filter on Control Chart Builder - Excluded Rows

This does work on my JMP (I am using version 19) but this is not quite the same as how my table is formatted. It looks like you applied a global data filter on the status column, which causes the P status batches to be excluded based on the selection of that global filter. However, this exclusion is only temporary, and gives the user the option to alter the selection. 

Another difference I see is that I have the :Batch column as my subgroup so the user can see what batch the data points belong to. When I add this to your version, it seems to stop functioning properly. Instead, I see that for the batches that are not reviewed (P status), the local data filter is ignored, and I instead see the average of all data points that belong to the batch in question.

I did find a workaround to my problem, by circumventing the issue of exclusion altogether. I wrote a function that I assigned to the local data filter that causes the mean and 3-sigma limits to be calculated whenever a new parameter is selected. This calculation is done excluding rows that have P status. I then force these limits onto the chart using the << Chart( Set Control Limits(###)) object message. Needless to say, this was not ideal, and I am still a bit confused why the charts are not displaying the way I would have expected. My script is below, if you want to scrutinize, maybe you can spot something I don't.

 

vlbreport << Append(
	cc = Control Chart Builder(
		Size( 750, 572 ),
		Show Two Shewhart Charts( 0 ),
		Show Excluded Region( 1 ),
		Show Limit Summaries( 0 ),
		Variables( Subgroup( :BatchCat, Position( 1 ) ), Y( :Result ) ),
		Chart(
			Points( Statistic( "Individual" ) ),
			Limits( Sigma( "Levey Jennings" ) )
		),
		Show Control Panel( 0 ),
		Where( :Conf > 0 ),
		Local Data Filter(
			Add Filter(
				columns( :EXT_Name ),
				Where( :EXT_Name == EXTNames[1] ),
				Display( :EXT_Name, "Radio Box Display", N Items( NItems(EXTNames) + 1 ) )
			)
		)
	);
);

For some background, EXT_Name is the name of the parameter on the CoA, Conf is a column that has a nonzero value for any result that goes onto a CoA, and BatchCat is a column with a combination of the BatchID and the Catalogue number of the product to ensure a unique ID for the batch. The matrix, EXTNames, that is referenced in the Where statement for the Local Data Filter, is just a list of each unique parameter name on the CoA, sorted by the tool they are tested on.

Recommended Articles