cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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