<?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: Re-formatting a sas output using proc report in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778009#M38134</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tryout2;
    set tryout1(where=(shelf='Shared')) tryout1(where=(shelf^='Shared'));
run;
proc sort data=tryout2;
    by category;
run;

proc report data=tryout2;
    by category;
    columns ("Article" article) (" " shelf),(" " value);
    define article/group ' ';
    define shelf/across order=data ' ';
    define value/sum format=8.1 ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Nov 2021 19:39:32 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-11-02T19:39:32Z</dc:date>
    <item>
      <title>Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777938#M38128</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a SAS output like the one showing in table 1 and i would like to format it so that I have the two tables shown in tables 2 and 3. Any assistance on this will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table 1&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Shelf&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Article&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Office&lt;/TD&gt;&lt;TD&gt;Art1&lt;/TD&gt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;Art2&lt;/TD&gt;&lt;TD&gt;51.64667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Home&lt;/TD&gt;&lt;TD&gt;Art1&lt;/TD&gt;&lt;TD&gt;42.9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Home&lt;/TD&gt;&lt;TD&gt;Art2&lt;/TD&gt;&lt;TD&gt;49.96667&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table2&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Office&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Article&lt;/TD&gt;&lt;TD&gt;Shared&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Art1&lt;/TD&gt;&lt;TD&gt;48.2&lt;/TD&gt;&lt;TD&gt;54.6&lt;/TD&gt;&lt;TD&gt;54.9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Art2&lt;/TD&gt;&lt;TD&gt;50.2&lt;/TD&gt;&lt;TD&gt;47.3&lt;/TD&gt;&lt;TD&gt;51.6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table 3&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Home&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Article&lt;/TD&gt;&lt;TD&gt;Shared&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Art1&lt;/TD&gt;&lt;TD&gt;54.9&lt;/TD&gt;&lt;TD&gt;50.2&lt;/TD&gt;&lt;TD&gt;42.9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Art2&lt;/TD&gt;&lt;TD&gt;51.6&lt;/TD&gt;&lt;TD&gt;46.1&lt;/TD&gt;&lt;TD&gt;50.0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 02 Nov 2021 15:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777938#M38128</guid>
      <dc:creator>FerGui1</dc:creator>
      <dc:date>2021-11-02T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777939#M38129</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have;
    by category;
    columns article shelf,value;
    define article/group;
    define shelf/across;
    define value/sum format=best8.1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Nov 2021 15:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777939#M38129</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-02T15:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777963#M38131</link>
      <description>&lt;P&gt;Hi PaigeMiller,&lt;/P&gt;&lt;P&gt;Thank you so much for your assistance. I run your proposed coding and got the output below. I will still need to:&lt;/P&gt;&lt;P&gt;1. Sort the shelf columns so that it shows in the order Shared, A, and B&lt;/P&gt;&lt;P&gt;2. Replace the 'Value' row by the shelf headings (Shared, A, and B)&lt;/P&gt;&lt;P&gt;3. Eliminate the 'Shelf' row&lt;/P&gt;&lt;P&gt;4. Round all the values to 1 decimal place&lt;/P&gt;&lt;P&gt;Could you help on that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FerGui1_0-1635870514145.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65317i0390FB8431560BBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FerGui1_0-1635870514145.png" alt="FerGui1_0-1635870514145.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 16:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777963#M38131</guid>
      <dc:creator>FerGui1</dc:creator>
      <dc:date>2021-11-02T16:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777967#M38132</link>
      <description>&lt;P&gt;At this point, I request that you provide your data as SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;), rather than as a screen capture, so I can actually work with it.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 16:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/777967#M38132</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-02T16:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778007#M38133</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this what you need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tryout1;&lt;BR /&gt;INPUT Shelf $ Category $ Article $ Value;&lt;BR /&gt;CARDS;&lt;BR /&gt;A Office Art1 54.566&lt;BR /&gt;A Office Art2 47.3333333&lt;BR /&gt;Shared Office Art1 48.2&lt;BR /&gt;Shared Office Art2 50.1833333&lt;BR /&gt;B Office Art1 54.9133&lt;BR /&gt;B Office Art2 51.646&lt;BR /&gt;A Home Art1 50.18&lt;BR /&gt;A Home Art2 46.1133333&lt;BR /&gt;Shared Home Art1 54.913&lt;BR /&gt;Shared Home Art2 51.6466667&lt;BR /&gt;B Home Art1 42.9&lt;BR /&gt;B Home Art2 49.9666667&lt;BR /&gt;;&lt;BR /&gt;proc sort data=tryout1; by category;&lt;BR /&gt;proc report data=tryout1;&lt;BR /&gt;by category;&lt;BR /&gt;columns article shelf,value;&lt;BR /&gt;define article/group;&lt;BR /&gt;define shelf/across;&lt;BR /&gt;define value/sum format=best8.1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 19:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778007#M38133</guid>
      <dc:creator>FerGui1</dc:creator>
      <dc:date>2021-11-02T19:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778009#M38134</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tryout2;
    set tryout1(where=(shelf='Shared')) tryout1(where=(shelf^='Shared'));
run;
proc sort data=tryout2;
    by category;
run;

proc report data=tryout2;
    by category;
    columns ("Article" article) (" " shelf),(" " value);
    define article/group ' ';
    define shelf/across order=data ' ';
    define value/sum format=8.1 ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Nov 2021 19:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778009#M38134</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-02T19:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re-formatting a sas output using proc report</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778014#M38135</link>
      <description>&lt;P&gt;PaigeMiller,&lt;/P&gt;&lt;P&gt;It works just as I needed.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 20:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Re-formatting-a-sas-output-using-proc-report/m-p/778014#M38135</guid>
      <dc:creator>FerGui1</dc:creator>
      <dc:date>2021-11-02T20:02:45Z</dc:date>
    </item>
  </channel>
</rss>

