Do you really mean to do this in JSL - i.e. to create a script that you can run to produce the summary? If you want to do this just one time interactively? I will answer both:
Interactively:
Create your data table - in this case i call it RawData,
Click Table >> Tabulate
Click Data and then Mean and drag it to the output area
Click Sum and drag it to the output area
Click on red triangle of the report >> Make into Data Table, or just use the report directly (Cut and Paste)
Using JSL
After creating the above using Make Into Data Table, name the table (Summary Report is used here)
Click on the red triangle >> Copy Script
Create a new script (File>>New>>Script)
Paste your newly copied script into the new script window
Close your previous summary report
Run the script you just created
The summary report should pop up
An example i made with random data:
Script:
New Table( "Summary Report",
Add Rows( 1 ),
New Script(
"Source",
(Data Table( "RawData" ) << Tabulate(
Add Table(
Column Table( Statistics( Mean, Sum ), Analysis Columns( :Data ) )
)
)) << Make Into Data Table
),
New Column( "Mean(Data)",
Numeric,
Continuous,
Format( "Best", 5 ),
Set Values( [171.936] )
),
New Column( "Sum(Data)",
Numeric,
Continuous,
Format( "Best", 5 ),
Set Values( [8596.8] )
)
)
Message me if you want my example files.
Barry