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
- :
- Can this be done with JMP?

- 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

Can this be done with JMP?

Jul 30, 2015 11:10 AM
(3683 views)

I have a really pressing need - and I have tried everything that I know. At this point I am not even sure it can be done with JMP, but I thought I ask the Experts!

I have many records like the one below

A B C D E

1182401337948T 07/22/2009 DDDD 999999 1

1182401337948T 07/22/2009 SSSS 0 1

What I need is for every record that has D=0 and the A and B columns are the same as to the record above - I need to create a new code DDDDSSSS and associate it with both rows

Do you think this can be done in JMP?

4 REPLIES 4

Highlighted
##

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

Re: Can this be done with JMP?

I think you could do it in two steps (someone might have a one step solution for you but this was quick)

Add a column F with the formula:

if (:D == 0 & Lag(:A, 1) = :A , "DDDDSSSS", Empty())

Then add a column G with the formula:

If(:F[Row() + 1] == "DDDSSS", "DDDSSS", :F)

Highlighted
##

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

Re: Can this be done with JMP?

Thank you Karen. I really appreciate you very quick response and great effort! Best Natalia

Highlighted
##

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

Re: Can this be done with JMP?

Natalia,

Building on what Karen provided...

Copy and paste into your column. I named the new column "Recoded Column".

If(Lag(:A, 1) == :A & :D == 0, Lag(:C, 1) || :C; :Recoded Column[Row() - 1] = Lag(:C, 1) || :C, :C)

Best,

Stan

Highlighted
##

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

Re: Can this be done with JMP?

Thank you Stan ! You are genius! This worked beautifully and did exactly what I was looking for.

Amazing!