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

Hello everyone

 

I'm trying to display two rows in Proc Report (across) as headers; however, if the cell for one row does not contain any data, the value from the other row won't be displayed either.

 

Hopefully the below example will explain it better:

 

data TEST;                                                                                                                            
   input ENTRY $ WD DAY VALUE;                                                                                                                 
   datalines; 

E1 -1 NULL 12
E1 01 20200803 51
E1 02 20200804 45
E1 03 20200805 15
E1 04 20200806 1
E1 09 2020081 32
E1 10 20200814 11
E1 11 20200817 65
;
run;


proc report data=TEST nowd;
column  ENTRY  WD, DAY, VALUE;
	define WD / 'Working Day' across NOZERO ORDER=DATA;
	define DAY /'' across;
	define ENTRY / group 'ENTRY';
	define VALUE / '' group;

quit;

 

The report won't show WD= -1 because the correspondent DAY is null.

 

How can I force it to show it anyway?

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ghosh
Barite | Level 11

Just add missing to Proc report

proc report data=TEST nowd missing;

View solution in original post

2 REPLIES 2
ghosh
Barite | Level 11

Just add missing to Proc report

proc report data=TEST nowd missing;
MART1
Quartz | Level 8
ah it was so easy, any thanks @ghosht!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 875 views
  • 1 like
  • 2 in conversation