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
- :
- Newbie question: How can I select multiple rows with different values in one col...

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

Highlighted

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

Jul 27, 2015 9:53 AM
(6335 views)

this is my data table:

A B

9 1300

10 1300

11 1300

12 500

13 900

14 1300

15 1300

16 1300

And I have three variables: M=10, N=11, and P=13

I want to select rows where A=M and A=N, and A=P.

I wrote this line, but it only selects A=M.

dt << **Select Where** **(**A==M& A==N & A==P**)** ;

do you have any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

A can't be 9 and 11 and 13 all at the same time. I think you want an OR operator instead of an AND operator.

dt << Select Where (A==M | A==N | A==P);

should do the trick.

Dan Obermiller

2 REPLIES 2

Highlighted

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

A can't be 9 and 11 and 13 all at the same time. I think you want an OR operator instead of an AND operator.

dt << Select Where (A==M | A==N | A==P);

should do the trick.

Dan Obermiller

Highlighted
##

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

Re: Newbie question: How can I select multiple rows with different values in one column?

Thanks a lot.