turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Hide and exclude rows in data table if criteria is...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 20, 2016 1:45 PM
(6538 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 21, 2016 5:51 AM
(12012 views)

Solution

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

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 21, 2016 5:51 AM
(12013 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 21, 2016 8:39 AM
(6006 views)

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