BookmarkSubscribeRSS Feed
Alexjaco1
Calcite | Level 5

I would like to replace all missing values with another cells value for example...

 

 

Data Have

 

OBS Var1Var2
11015
211.
312.

 

Data Want

OBS Var1Var2
11015
21111
31212

 

1 REPLY 1
r_behata
Barite | Level 11
data have;
input Var1 Var2;
cards;
10 15
11 .
12 .
run;

data want;
set have;
 var2=coalesce(var2,var1);
run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 752 views
  • 2 likes
  • 2 in conversation