BookmarkSubscribeRSS Feed
Santoshrk
Obsidian | Level 7

Hi Team, 

I'm using the below code to get the label in 2 lines. But for some reason the the text is not splitting into next line. Any Help much appreciated. 
example: "Placebo" in first line and "n/N(Response rate)" in the second line
sidebar / align = top;
      layout lattice / rows = 2 columns = 2 columnweights = preferred;
              entry halign = left "Placebo(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
              entry halign = left "DRUG_A(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
      endlayout;
endsidebar;

6 REPLIES 6
Ksharp
Super User
Try these two way:

1)
entry halign = left "Placebo(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
-->
entry halign = left "Placebo(*ESC*)n n/N(Response rate)"/ textattrs = (weight = bold);
2)
-->
entry halign = left "Placebo '0D'x n/N(Response rate)"/ textattrs = (weight = bold);
Santoshrk
Obsidian | Level 7

Santoshrk_0-1667650176197.png

I tried both the ways but it is not working. Please let me know if I miss anything. screenshot fo the code attached

Santoshrk_1-1667650255341.png

 

 

JeffMeyers
Barite | Level 11
Can you post a picture of what it looks like vs what you want it to look like (modify with paint)? Can cut out the graph part and just show the label.
Santoshrk
Obsidian | Level 7

Santoshrk_0-1667655555228.png

I need the column headers look like in the screenshot above

Ksharp
Super User
Could try these options ?

yaxistable subgroup Count Percent ci / VALUEJUSTIFY=center LABELJUSTIFY=center ;
JeffMeyers
Barite | Level 11
One thing to know is that you can nest layout statements. So rather than trying to add a line break just add another layout lattice or add a layout gridded with the number of rows you need and split the text:
Entry 'subgroup'.. ;
Layout gridded / rows=2;
Entry 'column 2 row 1 text';
Entry 'column 2 row 2 text';
Endlayout;
Layout gridded / rows=2;
Entry 'column 3 row 1 text';
Entry 'column 3 row 2 text';
Endlayout;
Entry 'column 4 text';

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
  • 6 replies
  • 3901 views
  • 1 like
  • 3 in conversation