Is it possible to have control charts re-calculate with a data filter and column switcher? If so - how?
FWIW, this works as I would expect:
NamesDefaultToHere(1); dt = New Table( "CCB", Add Rows( 50 ), New Column( "Y1", Numeric, "Continuous", Format( "Fixed Dec", 12, 3 ), Formula( Random Normal( 0, 1 ) ) ), New Column( "Y2", Numeric, "Continuous", Format( "Fixed Dec", 12, 3 ), Formula( Random Normal( 3, 1 ) ) ), New Column( "Group", Numeric, "Nominal", Format( "Best", 12 ), Formula( Random Integer( 1, 4 ) ) ) ); dt << Control Chart Builder( Size( 535, 453 ), Show Control Panel( 0 ), Show Capability( 0 ), Variables( Y( :Y1 ) ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Limits( Sigma( "Moving Range" ) ) ), Local Data Filter( Add Filter( columns( :Y1, :Y2, :Group ), Display( :Group, Size( 149, 56 ), List Display ) ) ), Column Switcher( :Y1, {:Y1, :Y2} ) );
Thanks, @ian_jmp . I realized the underlying data structure was not correct for applying the data filter.
I am working on creating an example of an analysis for complaint tracking:
https://public.jmp.com/packages/Number-of-Complaints-from-the-CFPB/js-p/5d6fcb91cf28b80f98081315
If you want to use a data filter, the process measurements need to be in a stacked format (process measurements in same column). If you want to use column switcher, the process measurements need to be split into separate columns.