News
On June 1, we’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
tom_abramov
Level IV

Data Filter on all columns of some file

Hi,

I need to create a filter for all columns in any file with default values to check.

Default value - any value which contains a word "Default". ("Default123", "Default_new" etc.)

I tried to run "<<Add Filter" with loop but after 10 columns it stops to work...

Please provide a solution without running "<<Add Filter" with loop. (It adds Filter group instead of adding to existing group).

 

I need a way to create a following expression I guess:

My_data_filter<< Add Filter(columns( list_of_columns ), list_of_where_expressions);

OR

I need a command that adds new filter to existing Filter Group:

Filter_Group = My_data_filter<< Add Filter(columns( {:age} ), Where( :age == {12,13} );

Filter_Group << Add (columns( {:sex} ), Where( :sex == {"M"} ));

 

Thanks in advance.

Tom.

 
 
 
 
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Data Filter on all columns of some file

Here's one way to add all columns to a single filter group in JMP 15:

 

dt=Open("$SAMPLE_DATA/Big Class.jmp");
df = dt<<DataFilter();
df<<Add Filter(Columns(EvalList({dt<<Get Column Names})));

Once you've done that, you can set the where clauses individually:

 

df<<(Filter Column(:age) << Where(:age == 14));

View solution in original post

2 REPLIES 2
Highlighted

Re: Data Filter on all columns of some file

Here's one way to add all columns to a single filter group in JMP 15:

 

dt=Open("$SAMPLE_DATA/Big Class.jmp");
df = dt<<DataFilter();
df<<Add Filter(Columns(EvalList({dt<<Get Column Names})));

Once you've done that, you can set the where clauses individually:

 

df<<(Filter Column(:age) << Where(:age == 14));

View solution in original post

Highlighted
tom_abramov
Level IV

Re: Data Filter on all columns of some file

Your solution worked for me very well.

I have a theorethic question:

Why this is ok:

 

df<<Add Filter(Columns(EvalList({dt<<Get Column Names})));

 

And this is not:

 

Col_List = dt << Get Column Names();
df<<Add Filter(Columns(EvalList(Col_List)));

 

 Do you have any suggestion how/where to learn/practice all evaluation usage?

Thank you!

 
 
 
 
0 Kudos