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

Hello all,

 

I am attempting to run a PROC REPORT and one of my numeric values has a leading zero (0.4253). I am trying to get this to display as 0.43 in my report, but I am unable to keep the leading zero. How do I go about doing this?

 

CODE - variable in question is Prob

 

PROC REPORT DATA = Work.Check;
COLUMN Statistic ("Statistical Results" DF Value Prob );
DEFINE Statistic / 'Test';
DEFINE Prob / 'P-Value' ;
DEFINE Value / FORMAT = 3.2;
RUN;

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

The format is to short. The number on the left is the total number of digits you want to be displayed, including separators. So, if you want 0.43 you have to use 4.2 as format.

View solution in original post

1 REPLY 1
andreas_lds
Jade | Level 19

The format is to short. The number on the left is the total number of digits you want to be displayed, including separators. So, if you want 0.43 you have to use 4.2 as format.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1132 views
  • 0 likes
  • 2 in conversation