Hi
i have a table of variables with values missing for some and not missing for some.how to get not missing of these values for all rows.
| subject | SODIUM_NLOW_VA | SODIUM_NHIGH_VA | POTASSIU_NLOW_VA | POTASSIU_NHIGH_VA | CARBDIOX_NHIGH_VA | CHLORIDE_NLOW_VA | CHLORIDE_NHIGH_VA | CARBDIOX_NLOW_VA |
| 1330 | 20 | 18 | ||||||
| 1330 | 50 | 30 | ||||||
| 1330 | 50 | 30 | ||||||
| 1330 | ||||||||
| 1330 | 20 | 15 | ||||||
| 1233 | 80 | 63 | ||||||
| 1233 | 80 | 63 | ||||||
| 1233 | ||||||||
| 1233 | ||||||||
| 1233 | 53 | 23 | ||||||
| 1233 | 53 | 23 | ||||||
| 1233 |
thanks in advance
What do you expect as result? One observation for each "subject" with all not missing values?
this how the output should look like
| subject | SODIUM_NLOW_VA | SODIUM_NHIGH_VA | POTASSIU_NLOW_VA | POTASSIU_NHIGH_VA | CARBDIOX_NHIGH_VA | CHLORIDE_NLOW_VA | CHLORIDE_NHIGH_VA | CARBDIOX_NLOW_VA |
| 1330 | 50 | 30 | 20 | 18 | ||||
| 1330 | 50 | 30 | 20 | 15 | ||||
| 1330 | 80 | 63 | ||||||
| 1330 | 80 | 63 | ||||||
| 1330 | 53 | 23 | ||||||
| 1233 | 53 | 23 |
Why should the two first obs of POTASSIU_NLOW_VA still be missing? Please provide a clear logic.
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.