DATA Step, Macro, Functions and more

Counting the number of rows that contain one or missing values

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

Counting the number of rows that contain one or missing values

I have a large data set and want to count the number of rows that contain one or more missing values. Was just wandering how to go about doing this.

 

Cheers


Accepted Solutions
Solution
2 weeks ago
PROC Star
Posts: 169

Re: Counting the number of rows that contain one or missing values

Something like this pehaps:

 

data want;
set have end=last; 
if cmiss(of _char_) or nmiss(of _numeric_)>=1 then count+1;

if last;
keep count;
run;

View solution in original post


All Replies
Solution
2 weeks ago
PROC Star
Posts: 169

Re: Counting the number of rows that contain one or missing values

Something like this pehaps:

 

data want;
set have end=last; 
if cmiss(of _char_) or nmiss(of _numeric_)>=1 then count+1;

if last;
keep count;
run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 89 views
  • 0 likes
  • 2 in conversation