- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Summary and Sorting - Sorting not working
I have a data table where I am wanting to calculate mean, and have the output sorted (Descending) from a grouped column.
As an example
I.e., Data table
If I summarize as follows:
Data Table( "Example_DT" ) << Summary(
Group( :i, :f, :g, :h ),
Order( Descending, Descending, Descending, Descending ),
Mean( :Values ),
Freq( "None" ),
Weight( "None" )
);
i.e., Selecting Descending
Output is incorrect: Shouldn't Column "i" start with 4 and descend down to 1? (This is the problem I am having with my large data table)
If I try to sort by saying I want column i in ascending order it produces the same table
Data Table( "Example_DT" ) << Summary(
Group( :i, :f, :g, :h ),
Order( Ascending, Ascending, Ascending, Ascending ),
Mean( :Values ),
Freq( "None" ),
Weight( "None" )
);
I am using JMP 16.2.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Summary and Sorting - Sorting not working
You have intermixed the control statements for Summary and Sorting platforms. They need to be separate steps. Here is the way I handle what you want
Names Default To Here( 1 );
dt = Current Data Table();
Data Table( "Example_DT" ) << Summary(
Group( :i, :f, :g, :h ),
Mean( :Values ),
Freq( "None" ),
Weight( "None" )
);
Data Table( "Example_DT By (i, f, g, h)" ) << sort(
Replace Table( 1 ),
By( :i, :f, :g, :h ),
Order( Descending, Descending, Descending, Descending )
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Summary and Sorting - Sorting not working
Well... it was not I who intermixed the control statements.
The user interface for creating a summary table has the options built in for the groups to be able to sort (Ascending/Descending).
The summarized data table "source" script has the script that I copied above including the Order.
I believe this may have worked in past JMP versions, because I am just now finding out this is not working... (I could be wrong, but don't think so).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Summary and Sorting - Sorting not working
I was not aware of the options, but as you found, they do not appear to work. I would submit the issue to
support@jmp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Summary and Sorting - Sorting not working
Thanks! JMP is now aware of the bug.