Hi,
The task is preparing everyday the daily sales of actual day.
Task is first completed by Tabulate (because of aggregate statistics) and then taken into Data Table and later updated with other data tables...etc...
Tabulate has local data filter but when scripting it to data table the local data filter does not take effect.
Any ideas, JSL mistakes, solutions?
Many thanks in advance
dtdaily = Data Table( "AgencyStayISL_LBL_Daily_Summary" );
tab = dtdaily << Tabulate(
Remove Column Label( Grouping Columns( :month ) ),
Show Control Panel( 0 ),
Uniform plot scale( 0 ),
Set Format( Sum( :NetRevenue( 22, 0 ) ) ),
Add Table(
Column Table( Analysis Columns( :NetRevenue ), Statistics( Sum, Column % ) ),
Column Table( Analysis Columns( :AdultNight, :FreeChildNight ), Statistics( Sum ) ),
Column Table( Analysis Columns( :RoomNight ), Grouping Columns( :month ), Add Aggregate Statistics( :month ), Statistics( Sum ) ),
Row Table( Grouping Columns( :Resort, :MARKETS, :Agency Code ), Add Aggregate Statistics( :Resort, :MARKETS, :Agency Code ) )
),
Local Data Filter(
Add Filter(
columns( :StayType, :Record Date ),
Where( :StayType == {1, 2, 3} ),
Where( :Record Date == Today() ),
Display( :StayType, Size( 142, 78 ), Check Box Display )
)
)
);
dt_sum = tab << Make Into Data Table;
dt_sum << Set Name( "Daily Sum" );