Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
LarsBirger
Level II

How to chose the most appropriate value from one of three columns and copy it to a fourth column?

Hi,

I am using JMP Pro on a regular basis in my work as a clinical professor of surgery in Sweden. Since not so many academic researchers in Sweden use JMP I really have appreciated the help I have got from the forum since there are not, yet, so many colleagues that I can ask (they mostly use SPSS).

My question is the following. I have three collums with events where Column 1 is Time in days to today´s date; column 2 is time to death and column 3 is time to new intervention. I would like to write a formula in the fourth column that först looks into column 3 and if there is a date there it picks it to column 4. If there is no date in column 3 it looks to column 2 and if there is a date there it picks that date. Otherwise it picks the date in column 1. See below where I have tried to exemplify:

 

Column 1.      Column 2       Column 3            Column 4

100                 ----------           -----------             100

100                 32                  ------------              32

100                 25                  10                        10

 

Would very much appreciated if I could write some formula in column 4 that picks out the numbers from columns 1-3.

 

Sincerely yours

 

Lars

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ian_jmp
Staff

Re: How to chose the most appropriate value from one of three columns and copy it to a fourth column?

Please take a look at the formula in the table attached and check that's the behaviour you want:

View solution in original post

1 REPLY 1
Highlighted
ian_jmp
Staff

Re: How to chose the most appropriate value from one of three columns and copy it to a fourth column?

Please take a look at the formula in the table attached and check that's the behaviour you want:

View solution in original post

Article Labels

    There are no labels assigned to this post.