<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Aligning values in a table with different formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16041#M2223</link>
    <description>You can check format Dw.p and Bestd.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
    <pubDate>Mon, 20 Jun 2011 06:29:43 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-06-20T06:29:43Z</dc:date>
    <item>
      <title>Aligning values in a table with different formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16039#M2221</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I'm creating a table output using proc tabulate and proc template.  The table is a population demographic report.  The rows are the various demographics and the column has the output statistical values.  See example below:&lt;BR /&gt;
&lt;BR /&gt;
Variable Stat       Value&lt;BR /&gt;
Age       n           200&lt;BR /&gt;
             mean     62.1&lt;BR /&gt;
             std        9.35&lt;BR /&gt;
&lt;BR /&gt;
Gender   n           200&lt;BR /&gt;
             female    100 (50%)&lt;BR /&gt;
             male      100 (50%)&lt;BR /&gt;
&lt;BR /&gt;
I would like to align the values in the third column so that they appear with decimal points aligned eg&lt;BR /&gt;
&lt;BR /&gt;
Age       n            200&lt;BR /&gt;
             mean       62.1&lt;BR /&gt;
             std            9.35&lt;BR /&gt;
&lt;BR /&gt;
Gender   n           200&lt;BR /&gt;
             female    100     (50%)&lt;BR /&gt;
             male      100      (50%)&lt;BR /&gt;
&lt;BR /&gt;
I've tried justifying the column both to the left and right neither of which aligns the decimal point.  When I justify using the decimal alignment, d, all of the decimals align but this causes the (%) statistic to right align rather than the count (100) aligning with the decimal point eg&lt;BR /&gt;
&lt;BR /&gt;
Age       n                          200&lt;BR /&gt;
             mean                     62.1&lt;BR /&gt;
             std                          9.35&lt;BR /&gt;
&lt;BR /&gt;
Gender   n                         200&lt;BR /&gt;
             female    100    (50%)&lt;BR /&gt;
             male      100    (50%)&lt;BR /&gt;
&lt;BR /&gt;
Any advice on this issue would be much appreciated.</description>
      <pubDate>Fri, 17 Jun 2011 12:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16039#M2221</guid>
      <dc:creator>den</dc:creator>
      <dc:date>2011-06-17T12:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning values in a table with different formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16040#M2222</link>
      <description>Your post got bitten by the forum options. You're going to have to work much harder to imply alignment as tabs and such don't work well and it uses a proportional font so spaces may not work quite as expected either. &lt;BR /&gt;
Example:&lt;BR /&gt;
   &lt;BR /&gt;
111&lt;BR /&gt;
OOO&lt;BR /&gt;
&lt;BR /&gt;
It might help to show your table code to see which approaches you were attempting and which output destination is needed.</description>
      <pubDate>Fri, 17 Jun 2011 17:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16040#M2222</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-17T17:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning values in a table with different formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16041#M2223</link>
      <description>You can check format Dw.p and Bestd.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Mon, 20 Jun 2011 06:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16041#M2223</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-20T06:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning values in a table with different formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16042#M2224</link>
      <description>I got it sorted.  In the end I had to create an extra column for the (%) and shorten the space between the count value and the (%) value.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 21 Jun 2011 11:01:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Aligning-values-in-a-table-with-different-formats/m-p/16042#M2224</guid>
      <dc:creator>den</dc:creator>
      <dc:date>2011-06-21T11:01:14Z</dc:date>
    </item>
  </channel>
</rss>

