BookmarkSubscribeRSS Feed
SmithCJGVSU
Obsidian | Level 7

How exactly does decimal alignment work?  In particular for character variables that contain percents like:

 
nn ( pp%)

60 ( 60%)

40 ( 40%)

 

Is it searching for the decimal from left-to-right then aligns on it?  Or, is it searching from right to left?  Will other symbols cause trouble like ( and %? What if there is not "." at all?  Looking for some general information on how just=d works in a DEFINE statement of proc report.

 

style(column)={just=d}

 

 

1 REPLY 1
ballardw
Super User

I'm going to go out on a limb and suggest that decimal alignment only works with numeric values. Since a character value could look like:

"12. abc. 3.4" which of the three decimals would be aligned?

 

Also for National Language Support issues a "decimal alignment" should be able to use the comma when that is the decimal separator.

 

From some documentation on ODS language statements:

 

ODS DECIMAL_ALIGN Statement

Controls the justification of numeric columns when no justification is specified.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 1002 views
  • 0 likes
  • 2 in conversation