cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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