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
- :
- Discussions
- :
- Iterating within a Column Formula

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

Dec 14, 2016 12:26 PM
(3767 views)

Hi All-

New JMP scripter here... I've been trying to create a Column Formula that would copy the value from another Column and paste it in X number of rows. I am able to get this to work using several intermediary columns, but this is super tedious. I have tried looping iterations using Local variables as counters, but have not gotten it to work. Specifically, (referencing the attached .xlsx file) If Antibody Value is not missing, I want it copied down 20 weeks (20 rows) in Antibody Value carried forward 20 wks.

Note- the copy down must respect the study ID- ie- only copy down the value if the study ID has not changed....

thx for any help with this.

best

jake

1 ACCEPTED SOLUTION

Accepted Solutions

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

Here is a formula that works

```
If( Is Missing( :Antibody Value ) == 0,
storeValue = :Antibody Value;
rowValue = Row();
idValue = :Study ID;
);
If( Row() - rowValue < 20 & :Study ID == idValue,
storeValue,
.
);
```

One can loop down and set values as you suggest, however since JMP is going to process down through all rows, it is just simpler to let JMP do the looping.

Jim

2 REPLIES

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

Here is a formula that works

```
If( Is Missing( :Antibody Value ) == 0,
storeValue = :Antibody Value;
rowValue = Row();
idValue = :Study ID;
);
If( Row() - rowValue < 20 & :Study ID == idValue,
storeValue,
.
);
```

One can loop down and set values as you suggest, however since JMP is going to process down through all rows, it is just simpler to let JMP do the looping.

Jim

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

Brilliant- works perfectly- and so clean... thx so much...

best

jake