cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Vmuthu
Level II

Adding Spec limits in variability-attribute gauge chart

I have a table with 100 devices, and 300 test items tested. I have spec columns separately contains LSL, USL. I want to plot the variability-attribute gauge chart with the spec limits in it. Please show me how to do it or if there is any existing discussion in this topic, please point it to me. thanks.

Sample data table:

DeviceTest NameMeasurementLSLUSL
1Test1230200240
1Test2201525
1Test3302535
2Test1234200240
2Test2221525
2Test3292535
3Test1229200240
3Test2211525
4Test1230200240
4Test2211525

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Adding Spec limits in variability-attribute gauge chart

The main issue with what you want, is that your data are not in a proper form for running the Variability-Attribute Chart platform.  The script below will transform a data table with the columns you have specified, into a data table that can be used to generate the charts you want.example.PNG

Names Default To Here( 1 );
dt = Current Data Table();

// Make a list of the Tests
Summarize( dt, testList = by( :Test Name ) );

dtSplit = dt << Split(
	Split By( :Test Name ),
	Split( :Measurement, :LSL, :USL ),
	Group( :Device ),
	Sort by Column Property
);

// Rename the test columns and set the Spec Limits
For( i = 2, i <= N Items( testList ) + 1, i++,
 
	// Assign the new names
	Column( dtSplit, i ) << set name( Substr( Column( dtSplit, i ) << get Name, 13 ) );
	
	// Set the Spec Limits
	Eval(
		Substitute(
				Expr(
					Column( dtSplit, i ) << set property(
						"Spec Limits ",
						{LSL( __LSL__ ), USL( __USL__ ), Show Limits( 1 )}
					)
				),
			Expr( __LSL__ ), Col Mean( As Column( dtSplit, i + N Items( (testList) ) ) ),
			Expr( __USL__ ),
				Col Mean( As Column( dtSplit, i + 2 * N Items( (testList) ) ) )
		)
	);
);

// Delete unwanted limits columns
dtSplit << delete columns( Index( N Items( testList ) + 2, N Cols( dtSplit ) ) );

 

Jim

View solution in original post

3 REPLIES 3
uday_guntupalli
Level VIII

Re: Adding Spec limits in variability-attribute gauge chart

@Vmuthu
        https://community.jmp.com/t5/Discussions/Adding-Control-spec-limits/m-p/7037#M7031 
        

        Have you checked the community for similar questions ? 

 

 

 

Best
Uday
txnelson
Super User

Re: Adding Spec limits in variability-attribute gauge chart

The main issue with what you want, is that your data are not in a proper form for running the Variability-Attribute Chart platform.  The script below will transform a data table with the columns you have specified, into a data table that can be used to generate the charts you want.example.PNG

Names Default To Here( 1 );
dt = Current Data Table();

// Make a list of the Tests
Summarize( dt, testList = by( :Test Name ) );

dtSplit = dt << Split(
	Split By( :Test Name ),
	Split( :Measurement, :LSL, :USL ),
	Group( :Device ),
	Sort by Column Property
);

// Rename the test columns and set the Spec Limits
For( i = 2, i <= N Items( testList ) + 1, i++,
 
	// Assign the new names
	Column( dtSplit, i ) << set name( Substr( Column( dtSplit, i ) << get Name, 13 ) );
	
	// Set the Spec Limits
	Eval(
		Substitute(
				Expr(
					Column( dtSplit, i ) << set property(
						"Spec Limits ",
						{LSL( __LSL__ ), USL( __USL__ ), Show Limits( 1 )}
					)
				),
			Expr( __LSL__ ), Col Mean( As Column( dtSplit, i + N Items( (testList) ) ) ),
			Expr( __USL__ ),
				Col Mean( As Column( dtSplit, i + 2 * N Items( (testList) ) ) )
		)
	);
);

// Delete unwanted limits columns
dtSplit << delete columns( Index( N Items( testList ) + 2, N Cols( dtSplit ) ) );

 

Jim
Vmuthu
Level II

Re: Adding Spec limits in variability-attribute gauge chart

Thank yoiu txnelson it worked.

Thanks Uday for the suggestion.