cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
WeiDerLee
Level I

"Order by count" do not work in a conditional data filter

Dear 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 "sort by count" don't work when "conditional" in the same data filter. (please refer following JSL code)

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
	)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: "Order by count" do not work in a conditional data filter

I 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
	)
);

txnelson_0-1630394168784.png

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

txnelson_1-1630394311846.png

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

txnelson_2-1630394424032.png

I suggest that you pass this on to the Support folks at JMP

     support@jmp.com

 

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: "Order by count" do not work in a conditional data filter

I 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
	)
);

txnelson_0-1630394168784.png

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

txnelson_1-1630394311846.png

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

txnelson_2-1630394424032.png

I suggest that you pass this on to the Support folks at JMP

     support@jmp.com

 

Jim
WeiDerLee
Level I

Re: "Order by count" do not work in a conditional data filter

Dear sir, many thanks to you.
I had sent this question to support@jmp.com

thanks.