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-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

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
  • 1333 views
  • 1 like
  • 2 in conversation