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

Hi,

 

When I run the following code I get an empty blue box under the smoking status values. Does anyone know how I can adapt my code to remove this box so "Heavy (16-25)" and the other values are on the same line as status2, sex2 and bpstatus2?

 

Thanks,

 

data merged;
 set sashelp.heart;
run;

proc report data=Merged split='~' nowd ;
	
	column status status2 sex sex2 bp_status bp_status2 Smoking_Status,(MRW);
	
	define Smoking_Status / Across;
	define status / Group noprint;
	define sex / Group noprint;
	define bp_status / Group noprint;
	define MRW / sum '';

	define status2 / computed;
	define sex2 / computed;
	define bp_status2 / computed;

compute before bp_status;
_status=status;
_sex=sex;
_bp_status=bp_status;
endcomp;

compute status2/character length=40;
status2=_status;
endcomp;
compute sex2/character length=40;
sex2=_sex;
endcomp;
compute bp_status2/character length=40;
bp_status2=_bp_status;
endcomp;
run;
1 ACCEPTED SOLUTION
4 REPLIES 4
EC27556
Quartz | Level 8

Or to use an even simpler example:

 

proc report data=Merged split='~' nowd ;
	
	column status sex bp_status Smoking_Status,(MRW);
	
	define Smoking_Status / Across;
	define status / Group;
	define sex / Group;
	define bp_status / Group;
	define MRW / sum '';

run;

The same holds true here too with the empty box in the results table.

andreas_lds
Jade | Level 19

Interesting, the whole table-header looks disgusting. The empty cell is cause by removing the label / variable name in the "define mrw" statement. It looks as if the number of empty cells for the status, sex and bp_status are calculated ignoring that mrw should not have a title.

Sounds like a task for tech support.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 420 views
  • 2 likes
  • 3 in conversation