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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1484 views
  • 0 likes
  • 2 in conversation