Hi @MariaK,
One way to do what you want is to create a summary table and then run tabulate on the summary table.
dt = Open( "$SAMPLE_DATA\Consumer Prices.jmp" );
dt << Summary(
Group( :Series, :Month ),
Sum( :Price ),
Freq( "None" ),
Weight( "None" )
);
dt2 = Current Data Table();
dt2:Name("Sum(Price)")<<Set Name("Monthly Total");
dt2 << Tabulate(
Change Item Label(
Statistics( Mean, " " ),
Grouping Columns( :Month( "All" ), "Monthly Average" )
),
Show Control Panel( 0 ),
Set Format( Mean( :Monthly Total( 12, 2 ) ) ),
Add Table(
Column Table(
Grouping Columns( :Month ),
Add Aggregate Statistics( :Month ),
Analysis Columns( :Monthly Total ),
Statistics( Mean )
),
Row Table( Grouping Columns( :Series ) )
)
);
Monthly Averagescheers,
Stan