<?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: creating a table consisting of 2 category in row and column and mean of continous variable in mi in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585981#M167218</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Had thought of, too (love proc TAB). If the OP needs a report rather than a data set, it's picture perfect.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2019 23:46:12 GMT</pubDate>
    <dc:creator>hashman</dc:creator>
    <dc:date>2019-09-03T23:46:12Z</dc:date>
    <item>
      <title>creating a table consisting of 2 category in row and column and mean of continous variable in middle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585941#M167199</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tablea.PNG" style="width: 271px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32187i4A9E14F5167E24FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="tablea.PNG" alt="tablea.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="answerlookingfor.PNG" style="width: 558px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32186iE1A9FCA5944048B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="answerlookingfor.PNG" alt="answerlookingfor.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have 10 million rows in a dataset and this is what data looks like (on left). consists of decile ,a category and profits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to create something on my right. Decile as rows, category as column and mean of profits as the values in the table. So for example - all the values that are in decile 1 and category a, their mean profit is 300 dollars.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 20:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585941#M167199</guid>
      <dc:creator>harsh0404</dc:creator>
      <dc:date>2019-09-03T20:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: creating a table consisting of 2 category in row and column and mean of continous variable in mi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585945#M167201</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/146403"&gt;@harsh0404&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Methinks this is what proc TRANSPOSE is designed for:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;                                        
  input decile category :$1.profit ;               
  cards ;                                          
1  a  300                                          
2  h  500                                          
4  t  670                                          
6  u  540                                          
8  q  109                                          
1  q  409                                          
9  r  870                                          
;                                                  
run ;                                              
                                                   
proc sort data = have out = haves ;                
  by decile ;                                      
run ;                                              
                                                   
proc transpose data = haves out = want (drop = _:) ;
  by decile ;                                      
  id category ;                                    
  var profit ;                                     
run ;                                              
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 20:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585945#M167201</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-09-03T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: creating a table consisting of 2 category in row and column and mean of continous variable in mi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585978#M167217</link>
      <description>&lt;P&gt;Or possibly as simple as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=have;
   class decile category;
   var profit;
   table decile=' ', 
         category*profit=''*mean=''
         /misstext=' ' box=decile
   ;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2019 23:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585978#M167217</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-03T23:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: creating a table consisting of 2 category in row and column and mean of continous variable in mi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585981#M167218</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Had thought of, too (love proc TAB). If the OP needs a report rather than a data set, it's picture perfect.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 23:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-table-consisting-of-2-category-in-row-and-column-and/m-p/585981#M167218</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-09-03T23:46:12Z</dc:date>
    </item>
  </channel>
</rss>

