Hi Team,
Request anyone to please kindly help with the below query.
I have a question where the data is as below:
| TEST | RESULT | TIMEPOINT |
| FU-ABC-1298 | 4.5 | 6 |
| FU-ABC-1298 | 0 | 0 |
| FU-ABC-1299 | 7.5 | 6 |
| FU-ABC-1299 | 0 | 0 |
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1299 | ||
| ABC-1299 | ||
| ABC-1299 | ||
| ABC-1299 |
My output should look like below:
| TEST | RESULT | TIMEPOINT |
| FU-ABC-1298 | 4.5 | 6 |
| FU-ABC-1298 | 0 | 0 |
| FU-ABC-1299 | 7.5 | 6 |
| FU-ABC-1299 | 0 | 0 |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 |
So you want to replace missing values with the last available non-zero non-missing value for a group?
Hi Team,
Request anyone to please kindly help with the below query.
I have a question where the data is as below:
| TEST | RESULT | TIMEPOINT |
| FU-ABC-1298 | 4.5 | 6 |
| FU-ABC-1298 | 0 | 0 |
| FU-ABC-1299 | 7.5 | 6 |
| FU-ABC-1299 | 0 | 0 |
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1298 | ||
| ABC-1299 | ||
| ABC-1299 | ||
| ABC-1299 | ||
| ABC-1299 |
My output should look like below:
| TEST | RESULT | TIMEPOINT |
| FU-ABC-1298 | 4.5 | 6 |
| FU-ABC-1298 | 0 | 0 |
| FU-ABC-1299 | 7.5 | 6 |
| FU-ABC-1299 | 0 | 0 |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1298 | 4.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 | |
| ABC-1299 | 7.5 |
Just one question: what does the TIMEPOINT variable do, and why is it mostly missing?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.