<?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: How to make a Three-Way Frequency Table and is there easier way ins SAS EG? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499120#M86</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/233144"&gt;@Luciferene&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Some&amp;nbsp;formatting questions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would I go about removing the rows that say Status and PctN?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;On those key words in the TABLE statement set them to ' '&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TABLES Price,
       Age*Status*(pctn&amp;lt;Status&amp;gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;=''&lt;/STRONG&gt;&lt;/FONT&gt;*FORMAT=mypct.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;On the reverse, is it possible for only the SOLD column to show and others to not show even when there are values. I think that would basically get me the second table I wanted.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Yes, but that should happen automatically -&amp;nbsp; for example in your table the OLD doesn't have an IN group.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 14:42:21 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-09-26T14:42:21Z</dc:date>
    <item>
      <title>How to make a Three-Way Frequency Table and is there easier way ins SAS EG?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/498864#M76</link>
      <description>&lt;P&gt;So each line of data I have has two numerical variables and one categorical variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have a report where the row and column to be range of the numerical variables and in each cell will have freq of categorical variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example if I have data:&lt;/P&gt;&lt;P&gt;35000 3 Sold&lt;BR /&gt;10000 5 Lease&lt;BR /&gt;21000 1 Lease&lt;BR /&gt;21000 1 Sold&lt;BR /&gt;9000 0 Sold&lt;BR /&gt;18000 1 In&lt;BR /&gt;36000 12 Sold&lt;BR /&gt;25000 4 Lease&lt;BR /&gt;17000 2 Sold&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the final format to look like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23521iDBD9C0B363D83386/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where the first does frequency for all the status and second only for one status.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    data cars;
    input Price Age Status$;
    cards;
 35000 3 Sold&lt;BR /&gt; 10000 5 Lease&lt;BR /&gt; 21000 1 Lease&lt;BR /&gt; 21000 1 Sold&lt;BR /&gt; 9000 0 Sold&lt;BR /&gt; 18000 1 In&lt;BR /&gt; 36000 12 Sold&lt;BR /&gt; 25000 4 Lease&lt;BR /&gt; 17000 2 Sold
    ;
run;


proc tabulate data=cars;
class Price Age Status;
tables Price,
       Age*Status*pctn&amp;lt;Status&amp;gt;={label="%"};
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If anything is unclear, please let me know and I'll try my best to clarify.&lt;/P&gt;&lt;P&gt;I won't be back on the community until tomorrow morning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 21:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/498864#M76</guid>
      <dc:creator>Luciferene</dc:creator>
      <dc:date>2018-09-25T21:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a Three-Way Frequency Table and is there easier way ins SAS EG?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/498874#M77</link>
      <description>Is age your NEW/MID/OLD? Have you tried applying any formats to your variables and then re-running the PROC TABULATE to get your output? You won't get that exact output unless you explicitly customize it though, which would mean a data step and PROC REPORT.</description>
      <pubDate>Tue, 25 Sep 2018 21:49:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/498874#M77</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-25T21:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a Three-Way Frequency Table and is there easier way ins SAS EG?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499112#M85</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes it is. Thanks for the guidance, applying formats gives information I wanted for the first table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    DATA cars;
    INPUT Price Age Status$;
    CARDS;

	35000 3 Sold
	10000 5 Lease
	21000 1 Lease
	21000 1 Sold
	9000 0 Sold
	18000 1 In
	36000 12 Sold
	25000 4 Lease
	17000 2 Sold
    ;
RUN;

PROC FORMAT;
VALUE ageformat 	0 = "New"
					1 - 3 = "Mid"
					4 - high = "Old";	

VALUE priceformat 	0 - 10000 = "Up to $10,000"
					10001 - 20000 = "$10,001 - $20,000"
					20001 - 30000 = "$20,001 - $30,000"
					30001 - high = "$30,000+";
PICTURE mypct (ROUND) low-high='009.99%';   

RUN;

PROC TABULATE DATA=cars;
CLASS Price Age Status;

FORMAT Age ageformat.;
FORMAT Price priceformat.;

TABLES Price,
       Age*Status*(pctn&amp;lt;Status&amp;gt;*FORMAT=mypct.);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 486px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23556i9235B54AE76F0C7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some&amp;nbsp;formatting questions:&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I go about removing the rows that say Status and PctN?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible for columns that aren't populated to show up&amp;nbsp;as 0%? For example, only SOLD status shows up for NEW, how can I get IN and LEASE to show up even though there aren't any data that fit in that category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the reverse, is it possible for only the SOLD column to show and others to not show even when there are values. I think that would basically get me the second table I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499112#M85</guid>
      <dc:creator>Luciferene</dc:creator>
      <dc:date>2018-09-26T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a Three-Way Frequency Table and is there easier way ins SAS EG?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499120#M86</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/233144"&gt;@Luciferene&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Some&amp;nbsp;formatting questions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would I go about removing the rows that say Status and PctN?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;On those key words in the TABLE statement set them to ' '&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TABLES Price,
       Age*Status*(pctn&amp;lt;Status&amp;gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;=''&lt;/STRONG&gt;&lt;/FONT&gt;*FORMAT=mypct.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;On the reverse, is it possible for only the SOLD column to show and others to not show even when there are values. I think that would basically get me the second table I wanted.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Yes, but that should happen automatically -&amp;nbsp; for example in your table the OLD doesn't have an IN group.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499120#M86</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-26T14:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a Three-Way Frequency Table and is there easier way ins SAS EG?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499929#M249</link>
      <description>&lt;P&gt;Thanks! I got it to work with the help you gave me.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 15:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-Three-Way-Frequency-Table-and-is-there-easier-way/m-p/499929#M249</guid>
      <dc:creator>Luciferene</dc:creator>
      <dc:date>2018-09-28T15:28:46Z</dc:date>
    </item>
  </channel>
</rss>

