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?
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.