Help using Base SAS procedures

proc sql, output % to 2 decimal places

Reply
Occasional Contributor
Posts: 9

proc sql, output % to 2 decimal places

Hi,

I have the following code segment:

how shall I make the % output to display up to 2 decimal places?

Thanks

Super User
Posts: 17,905

proc sql, output % to 2 decimal places

Apply a format to the variable.

proc sql;

  create table Q1Only as

    select mgmtProgram,

           sum(GAFPDGT5='Yes') as Numerator,

           count(*) as denominator,

           round(calculated numerator/calculated denominator,0.00001)  as result format percent8.2

      from sasuser.q1_only

        group by mgmtProgram;

quit;

Occasional Contributor
Posts: 9

proc sql, output % to 2 decimal places

thank you

Ask a Question
Discussion stats
  • 2 replies
  • 9641 views
  • 0 likes
  • 2 in conversation