cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
clarencelew
Level I

How do I add a filter column as a AND criteria

The syntax for Add Filter dictates that the new columns must be in the OR criteria.

Is there some way I can add rules in an iterative way?

dtf<<Add Filter(columns(column <,col>), <Where(clause)>)

Add one or more filter columns in a new OR group.

11 REPLIES 11
ian_jmp
Level X

Re: How do I add a filter column as a AND criteria

Here's one way:

// AND
df << removeLocalDataFilter;
colList = {"age", "sex"};
CMD = 
Expr(
	df = gb << Local Data Filter(
		Add Filter( columns( colsTBD ) )
		)
	);
SubstituteInto(CMD, Expr(colsTBD), colList);
CMD;
newbie_alex
Level III

Re: How do I add a filter column as a AND criteria

I fail to understand the fundamental difference between

 

1)

df = gb << Local Data Filter(Add Filter(columns({"age", "sex", "name"})));

 

and

 

2)

colList = {"age", "sex", "name"};

df = gb << Local Data Filter(Add Filter(columns(colList)));

 

1) works and 2) does not.

 

Would you please explain WHY?

 

Thank you for your help!

 

Recommended Articles