BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
akordula
Calcite | Level 5

I'm trying to run a proc report on a dataset that can have missing values (valid) in two columns (x & y), both of which are grouped.  Is there a way to NOT show missing values from x, but to still show missing values from y in the report?  The missing option either shows all of them or takes them all away, which I don't want.

 

Example:

 

title BOLD HEIGHT=4 'US';
proc report data=us.rates missing;
columns x y date,(n pctn) ;
define x/ group 'x' width = 5;
define y / group 'y' width = 3;
define dumcol / computed 'x';
define date / across order = internal;
define n / format =8. 'COUNT';
define pctn / "%" format = percent7.1;
rbreak after / summarize;
compute dumcol / char length = 10;
if _BREAK_ = '_RBREAK_' then dumcol = 'Total';
else dumcol = put(x,$10.);
endcomp;
run;
title;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Have you tried removing MISSING from the Proc statement and adding it to DEFINE options for Y (and any other variables that may want missing to appear)?

View solution in original post

4 REPLIES 4
HB
Barite | Level 11 HB
Barite | Level 11

I would think you would need to code the "missing" values differently. Perhaps a '999' in one data set and a '.' in the other. 

akordula
Calcite | Level 5

That would work for me, but then I would need to exclude 999 from the count, percentage etc.  Is there a way to exclude a certain value?

ballardw
Super User

Have you tried removing MISSING from the Proc statement and adding it to DEFINE options for Y (and any other variables that may want missing to appear)?

akordula
Calcite | Level 5

This worked, thank you!!!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 784 views
  • 0 likes
  • 3 in conversation