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!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

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

Hide and exclude rows in data table if criteria is met in one column

Hello, All


I am trying to hide and exclude all rows in a data table, that do not meet a given criteria. Such criteria is given by the values in one of the columns [:Hour].

I applied the formula to another column, but only worked within the cells of that column, and not the entire data table.

This is the script I am using [which is not working for the entire data table]:

dt = Current Data Table();

If( :Hour == 6,

    dt << As Row State( 0 ),

    dt << As Row State( 7 )

);

Any help will be appreciated,

Jose GL

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Hide and exclude rows in data table if criteria is met in one column

I believe this will do what you want:

 

 

dt =Current Data Table();
dt << select where( :Hour != 6 );
dt << hide and exclude;

 

 

 

You could loop through each of the rows and perform you If() function, excluding and hiding each row one at a time, but the above method works much faster and works on the entire data table.

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Hide and exclude rows in data table if criteria is met in one column

I believe this will do what you want:

 

 

dt =Current Data Table();
dt << select where( :Hour != 6 );
dt << hide and exclude;

 

 

 

You could loop through each of the rows and perform you If() function, excluding and hiding each row one at a time, but the above method works much faster and works on the entire data table.

Jim
gutloja
Level III

Re: Hide and exclude rows in data table if criteria is met in one column

Hi Jim,

This worked like a charm.

At the end of my script, I can just run it again and everything goes back to normal yay!

-JoseGL

Recommended Articles