Search code examples
sasenterprise-guide

SAS EG Summary Table percentage


When I use Summary Tables in EG to calculate some percentages the result is always multiplied by 100 (5.2 percent is not displayed as 0.052 but as 5.2). Now, if I want to display this as '5.2%' I have to divide the number by 100 and then apply the PERCENT format, or I have to 'put' the number as string and add '%' sign at the end.

Is there a way to get percentages from Summary tables already divided by 100 (0.052 in example above) or is there a way to get them displayed as '5.2%'. Main goal is to avoid that extra step after the Summary table.


Solution

  • One option is to make your own format.

    proc format;
    picture PCT
    low-high='009.9%'(mult=10);
    quit;
    

    That would take the number 5.2 and display it as 5.2%.