cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Zihao
Level II

Summary function doesn't work after adding statistics argument

Hi,

I got a question on my script about generating Summary Table, and here is what I did.

1. created a Summary table by JSL, call it S1 table

dt<<
Summary(
	Group( :Name( "Date-Time" ), :Lot, :Test ID, :Test Label, :Field X, :Field Y ),
	Variance( :Name( "Mreg (nm)" ) ),

);

2. trying to create another Summary table (S2) based on S1 with the following JSL

dt<< Summary(
	Group( :Name( "Date-Time" ), :Lot, :Test Label ),
	Mean( :Name( "Variance(Mreg (nm))" ) ),
	Freq( "None" ),
	Weight( "None" )
)

It didn't work with error "Column not found in access or evaluation of 'Bad Argument'"

3. I deleted the line of statistics argument, then it worked to generate S2

dt<< Summary(
	Group( :Name( "Date-Time" ), :Lot, :Test Label ),
	Freq( "None" ),
	Weight( "None" )
)

All scripts above were copied from auto-generated script (meaning I manually performed operations I want and copied the source script).

Would anyone have idea why?

 

Best regards,

Zihao

1 REPLY 1
txnelson
Super User

Re: Summary function doesn't work after adding statistics argument

There is not a column called 

 

"Variance(Mreg (nm))"

 

 in the S1 data table it is called

 

"Mreg (nm)"

Here is the code that should work

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

dt2 = dt <<
Summary(
	Group( :Name( "Date-Time" ), :Lot, :Test ID, :Test Label, :Field X, :Field Y ),
	Variance( :Name( "Mreg (nm)" ) ),
	Link to original data table(0)
);

dt3 = dt << Summary(
	Group( :Name( "Date-Time" ), :Lot, :Test Label ),
	Mean( :Name( "(Mreg (nm))" ) ),
	Freq( "None" ),
	Weight( "None" )
);

 

Jim