I am trying to tabulate a table and use a filter simultaneously to create a table that pulls out 6 rows of data that I can then join to another data table. The table that I see in my control panel is correct but when the script runs and creates the data table I am getting different data. Below is the code I use and 2 screen shots. Why is the table created different than the table seen in the control panel?
(Data Table("SILZone")<<Tabulate(
Add Table(
Column Table(
Analysis Columns( :Name( "Sum(BOTTLESOUT)" ) ),
Statistics( Mean, Sum )
),
Row Table( Grouping Columns(:DATE, :SHOP, :LOOP ) )
),
Local Data Filter(
Location( {208, 121} ),
Add Filter(
columns( :ZONENAME, :LOOP ),
Where( :ZONENAME == "Gob Cuts" ),
Where( :LOOP == 0 ),
Display( :ZONENAME, Size( 284, 259 ), List Display )
),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
));
<< Make Into Data Table;
=current data table();
<<set name("GobCuts");
From the tabulate control panel. This is the table I want:
This is what I get when I run the script: