"Order by count" do not work in a conditional data filterDear sirs:
I try to use the "conditional" and "order by count" in the same data fitler.
It can work by manual select, but do not work in the JSL.
The :age do not sort by count in the data filter.
Could any big boss can help? thanks.
Thanks.
Order by count can't work in this JSL:
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
Conditional,
Add Filter(
columns( :sex, :age ),
Where( :sex == "F" ),
Where( :age == 12 ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //this should let :age order by count in the data filter, but don't
)
);Order by count can work in this JSL("conditional" change to comment block):
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
//Conditional, //hi, i change to comment block
Add Filter(
columns( :sex, :age ),
Where( :sex == "F" ),
Where( :age == 12 ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //:age order by count can work when "conditional" change to comment block
)
);
ScriptingRe: "Order by count" do not work in a conditional data filterI do believe you have uncovered a bug. Here is what I have found, using JMP 16.1, Windows 10:
If one creates the filter, without any elements selected (Where () ), the Order element creates an ordered list
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
Conditional,
Add Filter(
columns( :sex, :age ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //this should let :age order by count in the data filter, but don't
)
);

And, if a selection is made to the Sex variable, the Conditional results are ordered

However, if one unselects the Sex choice, the ordering is no longer honored

I suggest that you pass this on to the Support folks at JMP
support@jmp.com