<?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 Making a Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391993#M94239</link>
    <description>&lt;P&gt;I am trying to make a table with Sale Years on the left side, and Use Codes along the top. Here is my program I am running:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=stats14f;
	class sale_yr dor_uc;
	var median_prc;
	table sale_yr, dor_uc;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is what I end up with:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.png" style="width: 176px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14743i65C4688EB6A4E217/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the table to show my median_prc data instead of just N? Should I even be running the proc tabulate statement or is there something else?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2017 19:21:26 GMT</pubDate>
    <dc:creator>andrewfau</dc:creator>
    <dc:date>2017-08-30T19:21:26Z</dc:date>
    <item>
      <title>Making a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391993#M94239</link>
      <description>&lt;P&gt;I am trying to make a table with Sale Years on the left side, and Use Codes along the top. Here is my program I am running:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=stats14f;
	class sale_yr dor_uc;
	var median_prc;
	table sale_yr, dor_uc;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is what I end up with:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.png" style="width: 176px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14743i65C4688EB6A4E217/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the table to show my median_prc data instead of just N? Should I even be running the proc tabulate statement or is there something else?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391993#M94239</guid>
      <dc:creator>andrewfau</dc:creator>
      <dc:date>2017-08-30T19:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Making a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391995#M94240</link>
      <description>&lt;P&gt;N is the default statistic. For a median add the keyword MEDIAN after the variable, ie Yearly median for the stock price.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.stocks;
class date stock ;
var open;
format date year4.;
table stock, date*open*(median);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391995#M94240</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-30T19:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Making a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391998#M94242</link>
      <description>&lt;P&gt;The VAR statement allows you to use MEDIAN_PRC in your table. However, it's still up to you whether you want to use it or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is MEDIAN_PRC actually the name of one of your variables?&amp;nbsp; Does your data already contain a single observation for each combination of SALE_YR and DOR_UC?&amp;nbsp; If so, you could code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table sale_yr, dor_uc * median_prc * mean=' ';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if MEDIAN_PRC is not one of your existing variables, you'll have to explain what variables are in your data set.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/391998#M94242</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-08-30T19:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Making a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/392000#M94243</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=stats14f;
	class sale_yr dor_uc;
	var median_prc;
	table sale_yr, dor_uc*median_prc*(MEDIAN);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/392000#M94243</guid>
      <dc:creator>andrewfau</dc:creator>
      <dc:date>2017-08-30T19:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Making a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/392001#M94244</link>
      <description>&lt;P&gt;I misunderstood your question, &lt;U&gt;&lt;STRONG&gt;my answer above is not correct.&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;It's showing the median of the variable median price. If you have data and want to display it, not calculate summary statistics then PROC TABULATE is not the correct procedure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be using PROC REPORT, and include the variable for the columns as an ACROSS type in the DEFINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Making-a-Table/m-p/392001#M94244</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-30T19:45:51Z</dc:date>
    </item>
  </channel>
</rss>

